Scalabium Software

SMExport advertising
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
 
SMMsg suite
ABA Picture Convert
Clarion to Text converter
ABA Database Convert
Clarion Viewer
Paradox to MS Access converter
Viewer for TNEF-files (winmail.dat)
DBExport tools
SMDBGrid
DBLoad
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

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

SMExport/SMImport suites