Jason Coley asked:

> So is there a way to convert the JPEG to a BMP in Delphi,
> I'm using D3.

The code I used (in Delphi 5) is:

  Bitmap := TBitmap.Create;
  Bitmap.PixelFormat := pf24Bit;
  Bitmap.HandleType := bmDIB;
  Bitmap.Width := Picture.Width;
  Bitmap.Height := Picture.Height;
  Bitmap.Canvas.Draw(0, 0, Picture.Graphic);

where Picture is a TPicture that contains a JPEG via the standard Delphi
JPEG code that has been supplied as an optional add on for yonks now. I
fairly certain that the above method should be portable to most Delphi
versions, and can be used to convert any supported TPicture graphic type
into a bit map.

Cheers, Max.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to