[Lazarus] TBitmap and pixel format

Philippe philippe at quarta.com.br
Wed Jun 18 16:45:48 CEST 2014


 

I am trying to undestand better ... I got now an pf32bit
pixelformat!!!!!! I need to check several cases ... 

Em 18.06.2014
11:10, Philippe escreveu: 

> I am trying to get raw data of image to
use it as texture. (Lazarus/windows 32 bits) 
> 
> basically I wrote
some stuff like that 
> 
> pict := TPicture.create;
> 
> try
>
pict.loadFromFile( ExpandFileNameUTF8( arqname));
> bm := pict.bitmap;
>

> // getting widht and height from bitmap (working fine!) 
> 
> .... 
>

> // pixels from bitmap
> pbarq := bm.rawimage.Data;
> 
> // copy to my
texture object .... 
> 
> ..... 
> 
> except 
> 
> // some message 
> 
>
end; 
> 
> the problem is that sometimes raw data are in a RGBA format,
sometimes in a RGB format ! 
> 
> in both case pixelFormat gives me
"pf24bit" !!!!!!! 
> 
> is there a simple way to distinguish the cases?

> 
> if there a better list to post this, just tell me! 
> 
> thanks 
>

> Philippe 
> 
> --
> _______________________________________________
>
Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
>
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [1]




Links:
------
[1]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140618/6ac9be26/attachment-0003.html>


More information about the Lazarus mailing list