gflConvertBitmapIntoDDB

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, xnview

Post Reply
User avatar
madiazg
Posts: 82
Joined: Wed Jul 18, 2007 8:00 pm
Location: Tenerife - Islas Canarias
Contact:

gflConvertBitmapIntoDDB

Post by madiazg » Sun Oct 17, 2010 6:24 pm

I am using the following code to display an image:

Code: Select all

var
  bmp: TBitmap; // Bitmap
  hBmp: HBitmap;
begin
  Bmp := TBitmap.Create;
  TRY
    Bmp.PixelFormat := pf24bit;
    Bmp.Width  := gfl_bmp.Width;
    Bmp.Height := gfl_bmp.Height;
    hBmp := bmp.Handle;
    gflConvertBitmapIntoDDB(gfl_bmp,hBmp);
    Imagen.Picture.Graphic := Bmp; //Muestra la imagen
  FINALLY
    Bmp.Free; //Libera Memoria
  END;
end;
The image shows completely blank. Can you tell me I'm doing wrong?

The code I use now and I want to replace gflConvertBitmapIntoDDB is:

Code: Select all

    FOR j := 0 TO Bmp.Height-1 DO
    BEGIN
      Row := Bmp.Scanline[j];
      FOR i := 0 TO Bmp.Width-1 DO
      BEGIN
        gflGetColorAt(gfl_bmp,i,j,Pgfl_color);
        WITH Row[i] DO
        BEGIN
          rgbtRed   := pgfl_color.Red;
          rgbtGreen := pgfl_color.Green;
          rgbtBlue  := pgfl_color.Blue;
        END
      END
    END;
Regards...
Miguel Angel

Post Reply