Playing around further I've managed to get something kinda working. See attached image. Left is what I now render via my 3rd party image library, right is what it is supposed to look like.
Two points to note about the attached image: 1. The colours are obviously wrong. 2. The image seems stretched horizontally. I'm not sure if this is due to the TFPColor being Word size elements instead of Byte size elements. On 2016-05-26 11:24, Graeme Geldenhuys wrote: > 1) I'm assuming FData is the raw image buffer of TFPMemoryImage where > all the image pixel data is stored? I seem to have answered this myself by simply trying it and casting TFPMemoryImage to a "friend class" (hack) so I can access the protected FData field variable. > 2) Nowhere in TFPMemoryImage is the size of FData being set, it seem > it is always a hard-coded size, based on the type declaration > shown above. Isn't this inefficient? Afterwards I found the TFPMemoryImage.SetSize() which reallocates memory based on the image dimensions. So memory usage is not hard-coded as I first thought. My earlier questions 3, 4 and 5 I still don't have answers to. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal