Hi all,
I'm using the ImageHelper to resize an attachment before publishing it to my CDN.
Say I have an image 800px x 500px that I want to re-size to 200px x 100px.. I use the Kentico attachment GUID to get the AttachmentInfo, and then ImageHelper to resize the image. However it doesn't work as expected, and will save the image to a size of 200px x 200px.
For example, if I have the correct values for width (200) and height (100)
AttachmentInfo ai = AttachmentInfoProvider.GetAttachmentInfo(attachmentGuid, CMSContext.CurrentSite.SiteName);
byte[] resizedImage = ImageHelper.GetResizedImageData(ai.AttachmentBinary, ai.AttachmentExtension, width, height, width);
Any ideas?
Thanks