Create a Thumbnail of an Image, based on input image file, and a max size factor to resize the image.
The extension has two inputs:
- The 'SourceImageBin';
- MaxSize.
The max size is to calculate the thumbnail proportion.
The calc is based on the follwing formula:
if (ImageOriginal.Width > (ImageOriginal.Width .Height)
{
return new Size(MaxSize,(int)(((double)(ImageOriginal.Width .Height / (double)(ImageOriginal.Width .Width) * MaxSize));
}
else
return new Size((int)(((double)(ImageOriginal.Width .Width / (double)(ImageOriginal.Width .Height) * MaxSize), MaxSize);
In this new version it’s possible to generate the thumbnail in new formats:
- JPEG;
- GIF.
So at this moment the extension generate the thumbnail in 3 formats:
- PNG (Default format if none is provided);
And now it´s possible to distinguish
better the extension with new icon: