Scalabium Software

SMExport/SMImport suites
Knowledge for your independence'.
Home Delphi and C++Builder tips


#13: I want to generate thumbnail from image

//create the thumbnail 
int image_width = 96; 
int image_height = 96; 
Image imgThumbnail = imgOriginal.GetThumbnailImage(image_width, image_height, null, IntPtr.Zero); 
 
//save to file 
imgThumbnail.Save(Path.GetDirectoryName(AFileName) + @"\a2.bmp", ImageFormat.Bmp);

or

private bool ThumbnailCallback()
{
    return false;
}
 
private void ProcessImage(Image imgOriginal)
{
    //create the thumbnail
    int image_width = 96;
    int image_height = 96;
    Image.GetThumbnailImageAbort myCallback = new Image.GetThumbnailImageAbort(ThumbnailCallback);
    Image imgThumbnail = imgOriginal.GetThumbnailImage(image_width, image_height, myCallback, IntPtr.Zero);
 
    //save to files
    imgThumbnail.Save(Path.GetDirectoryName(AFileName) + @"\a2.png");
}


Published: August 11, 2010

See also
 
ABA Document Convert
Viewer for TNEF-files (winmail.dat)
Paradox to MS Access converter
Protected Storage Viewer
DBISAM Viewer
Excel Reader (dll)
DBISAM Password Recovery
SMReport
SMMsg suite
Paradox to Text converter
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2025, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMExport advertising