Export Image from GdPicture to a TImage Delphi object
Posted: Wed Jun 27, 2007 11:12 am
Hello,
I am trying to create thumbnails from all the files in a folder with Delphi 7. I achieved this by creating GdViewer for each thumbnail but its slow and unnessesary.
i would like to know if it is possible to get a bitmap (in runtime) out of GdViewer/GdPicture when an image is loaded, to put in standard image components like TImage.
I mean something like
TImage.Bitmap := GdViewer.GetBitmap
would be great but there's no bitmap, GetNativeImage returns an Integer, gdpicture.GetPicture returns IPictureDisp ?, even gdpicture.GetHBitmap returns an integer.
if this cannot be done, is there other way to create thumbnails? (I have seen a VB example, cannot understand why ImageList1.ListImages.Add(... , oGdPicture.GetPicture, ...) works, because it doesnt in Delphi, saying "Incompatible Types: TBitmap and IPictureDisp".
Anyone?
Slava
I am trying to create thumbnails from all the files in a folder with Delphi 7. I achieved this by creating GdViewer for each thumbnail but its slow and unnessesary.
i would like to know if it is possible to get a bitmap (in runtime) out of GdViewer/GdPicture when an image is loaded, to put in standard image components like TImage.
I mean something like
TImage.Bitmap := GdViewer.GetBitmap
would be great but there's no bitmap, GetNativeImage returns an Integer, gdpicture.GetPicture returns IPictureDisp ?, even gdpicture.GetHBitmap returns an integer.
if this cannot be done, is there other way to create thumbnails? (I have seen a VB example, cannot understand why ImageList1.ListImages.Add(... , oGdPicture.GetPicture, ...) works, because it doesnt in Delphi, saying "Incompatible Types: TBitmap and IPictureDisp".
Anyone?
Slava