On Fri, 2007-03-09 at 14:52 -0500, Michael Traynor wrote:
Where in a Fract???.gif file does the Fractint data appear? I have a question and want to be on sound ground before I raise it. All I can identify is that the file starts with GIF98a and near the end there is a little plain text that is "fractint001 Fractal" with the space actually being y with an umlaut over it. Nothing else identifiable as plain text. The point I particularly want to know about is how the V screen parameters are included. It should be shortly after the GIF89a, as part of the standard GIF file format. Actually, I believe it is at the end of the graphic file format, when FractInt saves the image file.
That is where the Fractint data is, yes. But, the answer to Charles' question about where the <v> screen data is, is that Fractint does not save it. The only information about the resolution of the GIF would be the stuff saved as part of the GIF specification (ie, right after GIF89a).
Are you sure? Fractint stores at least both the screen resolution and the image size.
Yes, I'm sure the View Window variables are not stored in the GIF file. These are variables such as viewxdots, viewydots, viewwindow, viewcrop, and viewreduction. For them to be stored in the GIF file, they would need to be in the fractal_info structure as defined in fractint.h, or possibly tacked on after (or before) the fractal_info structure is saved (see encoder.c). Then they would have to be restored. This is done in loadfile.c (decoder.c is lower level, the variables are restored in loadfile.c). Again, the View Windows variables do not appear to be saved to or restored from GIF files.
I just generated two images both at size 640x480, one using the <v> screen and with a screen resolution of 1280x1040 and the other by using a screen resolution of 640x480 and saved them. On re-opening the first, the screen res Fractint tossed up was the 1280x1024 it had been generated in then displayed the image taking up only a small part of the screen and on hitting <v> the <v> screen info for that size was there. In the latter, the screen res on opening was 640x480 and the image occupied the whole screen and there were just the default <v> screen parameters.
This can work because we have saved two different resolutions. The physical image size, say 1280x1040, is saved right after the GIF89a. The calculated image size using the View Window parameters, say 640x480, is saved as the variables xdots and ydots in the fractal_info structure.
From these two resolutions, we can calculate the variables for the View Window screen. This happens in loadfdos.c.
Jonathan