Create image from code

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
rullbandspelare
Pro Scripter
Posts: 149
Joined: Tue Mar 23, 2004 9:11 pm

Create image from code

Post by rullbandspelare » Sun Apr 02, 2023 3:40 pm

Sharing a fun tip on ways to create pixels with Macro scheduler.

I was looking for a 16bit grayscale image that had all the 65k grayscales. But did not find one.
This one is 8bit and You need a .pgm compatible viewer, like Irfanview to view this 50x255 image.

WriteLn>8BitGrayScaleImage.pgm,x,P2%CRLF%50 255%CRLF%255
Let>k=-1
Repeat>k
Let>k=k+1
Let>Row=%k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k% %k%
WriteLn>8BitGrayScaleImage.pgm,x,%Row%
Until>k,255

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts