Scalabium Software |
|
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"); }
|
Copyright© 1998-2024, Scalabium
Software. All rights reserved. |