[fpc-pascal] Save image into BMP or JPEG using Free Pascal (Save screenshot of OpenGL scene)

Marco van de Voort marcov at stack.nl
Wed Feb 20 09:30:11 CET 2008


> Jakub Marian wrote:
> 
> The image format in the memory is clearly specified, as the main use of 
> this unit is to cooperate with OpenGL (for loading images, textures, 
> saving screenshots etc.). See TImage class comments, basically RawPixels 
> is simply a pointer to an array of Width * Height pixel values, and each 
> descendant of TImage specifies the exact layout of "pixel" --- e.g. for 
> TRGBImage a pixel is just 3 bytes, for red/green/blue.

Is the latter a hard requirement of OpenGL? In the fpimage rework, I had
hoped to skip 24-bit color and use 32-bit for that.

Also, does OpenGL support bottom up (lines other way around in memory)
layouts, or only top down?



More information about the fpc-pascal mailing list