| This sample uses Chart object from OWC library to resize any image and convert the image to a specified format (.jpg, .png, .bmp, .gif...). The image is placed to the chart using SetTextured property, which can load any image file from a disk. Then you can use border property to set some frame around the image (or left the frame blank) and export the picture using ExportPicture method to a disk or get the picture as a binary data for BinaryWrite using GetPicture method. You can see this short code with Huge ASP file upload live at Upload with resize page.
Upload and image resize sampleNext piece of VBScript code if from the live resize sample and demonstrates the ResizeImage function. The source gif, jpeg or png image from upload is saved to a temp folder. The code reads data for the resize - new width and height and out format and then calls response.binarywrite ResizeImage().
| |
| |
If you like this page, please include next link on your pages: <A Href="http://www.motobit.com/tips/detpg_asp-resize-image/" Title="Short sample of using Office web components to resize and convert image to another format" >ASP image resize and jpg/gif/png convert, free VBScript code</A> |
discuss this topic to forum
