On Thu, 15 Oct 2015 15:30:41 +0700 Ryan Joseph <r...@thealchemistguild.com> wrote:
> > > On Oct 14, 2015, at 1:49 PM, Michael Van Canneyt <mich...@freepascal.org> > > wrote: > > > > Type > > TMyImage = Class(TFPCompactImgRGBA8Bit) > > Public > > property Data : PFPCompactImgRGBA8BitValue read FData; > > end; > > > > > > Should do it. Or if you don't need Alpha: > > > > TMyImage = Class(TFPCompactImgRGB8Bit) > > Public > > property Data : PFPCompactImgRGB8BitValue read FData; > > end; > > > > You could throw in a property to get a direct pointer > > TFPCompactImgRGBA8Bit descends from TFPMemoryImage I assume? Actually it works like TFPMemoryImage and descends from TFPCustomImage. The only difference is that it uses 4*8=32bit per pixel instead of 4*16bit. It is only a few lines of code, so if you need a different pixel format or scan lines it is really easy to create your own image class. > I need to draw text as textures also and I found an example at > http://wiki.freepascal.org/fcl-image#Drawing_text which uses > TFPMemoryImage. Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal