From: "Earl F. Glynn" Subject: pf32bit enigma: "alpha byte" indeterminate in new bitmap? Date: 10 Apr 2000 00:00:00 GMT Message-ID: <8ct9hb$38011@bornews.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Organization: efg's Computer Lab X-MSMail-Priority: Normal Reply-To: "Earl F. Glynn" Newsgroups: borland.public.delphi.graphics // Why does one Win 98 Pentium report // FFFFFFFF -1 NAN // while two other Pentiums (one Win 95, one Win 98) report // 1FFFFFF 33554431 0.00 // in the example below? procedure TForm1.Button1Click(Sender: TObject); TYPE TRowSingle = ARRAY[WORD] OF Single; pRowSingle = ^TRowSingle; TRGBQuadArray = ARRAY[WORD] OF DWORD; // could use TRGBQuad pRGBQuadArray = ^TRGBQuadArray; VAR Bitmap : TBitmap; RowSingle: pRowSingle; RowDWORD : pRGBQuadArray; begin Bitmap := TBitmap.Create; TRY Bitmap.Width := 100; Bitmap.Height := 100; Bitmap.PixelFormat := pf32bit; RowSingle := Bitmap.ScanLine[0]; RowDWORD := Bitmap.ScanLine[0]; ShowMessage( Format('%8x %d %f', [RowDWORD[0], RowDWORD[0], RowSingle[0]] )); Image1.Picture.Graphic := Bitmap; FINALLY Bitmap.Free END end; Both values are equivalent "white" colors, but why should the values be different in the "alpha" byte? I'm using a pf32bit bitmap to store a matrix of Single values, and got bit by the NaN initialization on one machine. -- efg Earl F. Glynn Overland Park, KS USA efg's Computer Lab: http://www.efg2.com/Lab