I would just replace the content of an similar existing tiff file created in Gimp:
PROGRAM ReplaceTiff;
VAR C: CHAR; F,F2: FILE; I: ShortCard; L: MedCard;
BEGIN Reset(F,'Old.tif',1); Rewrite(F2,'New.tif',1);
{ Save Header }
BlockRead(F, C,1); BlockWrite(F2, C,1);
BlockRead(F, C,1); BlockWrite(F2, C,1);
BlockRead(F, I,2); BlockWrite(F2, I,2);
BlockRead(F, L,4); { L needed later! } BlockWrite(F2, L,4);
{ Write Body }
FOR Y := 1 TO yResolution DO BEGIN FOR X := 1 TO xResolution DO BEGIN BlockWrite(F2, a[X,Y],1); END; END;
{ Save Trailer }
Seek(F,L); WHILE NOT EOF(F) DO BEGIN BlockRead(F, I,2); BlockWrite(F2, I,2); END;
Close(F2); Close(F); END.
On Fri, Oct 9, 2009 at 2:53 PM, twixt@cstone.net wrote:
I installed gpc and all required or recommended packages using aptitude. The manual apparently contains no mention of graphics output. But that's why I downloaded Pascal in the first place!
Looking through the mailing list archives, I find mention of a GRX library. But when I do a search for "grx" within aptitude, I come up empty.
All I want to do is create a 432 pixel x 378 pixel image with over 2000 different 24-bit colors, all in a very precise pattern, a fractal shape as a matter of fact. In the time it is taking me to find any programming language that will let me do this, I suppose I could do it manually with a graphics editor, although this would be somewhat tedious.
I can create a 432x378 array of strings, where each string is the hexadecimal code for a 24-bit color. How can I turn this array into an image? Does anyone know of a programming language which DOES do graphics?
Thanks for your patience.
David Bush