C
Chris Perry
How do you create a thumbnail constrained to a box, without distorting and
but making where it doesn't fill the box transparent.
I'm two thirds there :
Size fitImageSize = this.GetScaledImageDimensions(
myBitmap.Width, myBitmap.Height, intThumbWidth,
intThumbHeight);
Bitmap imgOutput = new Bitmap(myBitmap, fitImageSize.Width,
fitImageSize.Height);
imgOutput.Save(Server.MapPath(sSavePath + sThumbFile),
System.Drawing.Imaging.ImageFormat.Jpeg);
But its the third aspect that is tricky,
Cheers all.
but making where it doesn't fill the box transparent.
I'm two thirds there :
Size fitImageSize = this.GetScaledImageDimensions(
myBitmap.Width, myBitmap.Height, intThumbWidth,
intThumbHeight);
Bitmap imgOutput = new Bitmap(myBitmap, fitImageSize.Width,
fitImageSize.Height);
imgOutput.Save(Server.MapPath(sSavePath + sThumbFile),
System.Drawing.Imaging.ImageFormat.Jpeg);
But its the third aspect that is tricky,
Cheers all.