<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>I am trying to get raw data of image to use it as texture. (Lazarus/windows 32 bits)</p>
<p>basically I wrote some stuff like that</p>
<p> </p>
<p> pict := TPicture.create;<br /><br /> try<br /> pict.loadFromFile( ExpandFileNameUTF8( arqname));<br /> bm := pict.bitmap;<br /><br /></p>
<p> // getting widht and height from bitmap (working fine!)</p>
<p> ....</p>
<p> // pixels from bitmap<br /> pbarq := bm.rawimage.Data;<br /><br /></p>
<p> // copy to my texture object ....</p>
<p> .....</p>
<p> except</p>
<p>// some message</p>
<p> end;</p>
<p> </p>
<p>the problem is that sometimes raw data are in a RGBA format, sometimes in a RGB format !</p>
<p> </p>
<p>in both case pixelFormat gives me "pf24bit" !!!!!!!</p>
<p> </p>
<p>is there a simple way to distinguish the cases?</p>
<p> </p>
<p>if there a better list to post this, just tell me!</p>
<p> </p>
<p>thanks</p>
<p>Philippe</p>
<p> </p>
</body></html>