Last post Jun 09, 2008 05:56 AM by KCrow
Mar 12, 2008 03:35 PM|es-web|LINK
Is there a way to resize a png or a gif image with out chancing the PixelFormat?
If i change the PixelFormat from an indexed to e.g. Format24bppRgb then when im trying to save the image whit the original ImageFormat i get a GDI+ generic error. But if i change the ImageFormat to Jpeg then it works.
I'll like to keep the original ImageFormat?
Jun 09, 2008 05:56 AM|KCrow|LINK
Here is a function to resize a bitmap. You can read your image into a bitmap to resize and then use the save method to save it in any format you would like
scale = (boxHeight) / InputBitmap.Width
scale = (boxWidth) / InputBitmap.Height