[fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Graeme Geldenhuys
Hi, The internal FData field variable of TFPMemoryImage is of type FPFItegerArray and is defined as follows: TFPIntegerArray = array [0..(maxint-1) div sizeof(integer)-1] of integer; PFPIntegerArray = ^TFPIntegerArray; Unfortunately the FPImage unit is not documented at all. So I have the fo

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Michael Van Canneyt
On Thu, 26 May 2016, Graeme Geldenhuys wrote: Hi, The internal FData field variable of TFPMemoryImage is of type FPFItegerArray and is defined as follows: TFPIntegerArray = array [0..(maxint-1) div sizeof(integer)-1] of integer; PFPIntegerArray = ^TFPIntegerArray; Unfortunately the FPImag

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Graeme Geldenhuys
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

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Graeme Geldenhuys
On 2016-05-26 12:08, Michael Van Canneyt wrote: > BUT: > depending on UsePalette, it contains indexes in the palette or RGB Data. Oh, I forgot about Palette usage. I’ll have to check for that in my code. Does setting UsePalette := False at runtime auto convert palette data to RGB data? I had a lo

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Michael Van Canneyt
On Thu, 26 May 2016, Graeme Geldenhuys wrote: On 2016-05-26 12:08, Michael Van Canneyt wrote: BUT: depending on UsePalette, it contains indexes in the palette or RGB Data. Oh, I forgot about Palette usage. I’ll have to check for that in my code. Does setting UsePalette := False at runtime a

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Graeme Geldenhuys
On 2016-05-26 13:22, Michael Van Canneyt wrote: > Yes it does, but this is very slow. Probably due to Colors array usage. ;-) > Yes. But sometimes it is all you've got; e.g. when drawing on an image. Just so that others know, the 3rd party image library I’m using is AggPas. AggPas (like most ot

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Michael Van Canneyt
On Thu, 26 May 2016, Graeme Geldenhuys wrote: On 2016-05-26 13:22, Michael Van Canneyt wrote: Yes it does, but this is very slow. Probably due to Colors array usage. ;-) Yes. But sometimes it is all you've got; e.g. when drawing on an image. Just so that others know, the 3rd party imag

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-06-01 Thread Mattias Gaertner
On Thu, 26 May 2016 11:24:44 +0100 Graeme Geldenhuys wrote: >[...] > 3) The FData image buffer (assuming (1) is correct) uses Integer instead >of Byte as it's element size. So I'm assuming a singe Integer hold >all the colour information for a single pixel? No, TFPMemoryImage uses one TF

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-06-01 Thread Graeme Geldenhuys
On 2016-06-01 11:26, Mattias Gaertner wrote: > TFPCompactImgRGBA8Bit uses 32bit. Thanks for the information Mattias. In the end I managed with the TFPCompactImgRGBA8Bit image type. From what I can remember, after some experimentation, the internal channel information in memory was in BGRA format.