The default usage of our file management means allow to use
resizing on upload Generally, we use the
AttachmentManager methods for resizing attachments and files. It utilizes
CMS.GlobalHelper.ImageHelper class methods for the image processing itself.
The methods usage can be seen in our pages or controls codefiles and they should be offered in VisualStudio or seen in
API referenceYou can see how the attachments (images) are resized e.g. in the /CMSPages/GetFile.aspx.cs script. Here, for example the
EnsurePhysicalFile method either points to an existing thumbnail image file or creates a new one of the required dimensions (see
image size parameters for getfile script)
You maybe want to replace the original image file with the resized (typically shrinked) one instead of creating a thumbnail images, and also do it completely independent on our file management means, so you will be probably working just with binary file data (used to instantiate an Image object) and overwriting the original file with the resized image data. Then the
ImageHelper with standard file operation methods should be sufficient for your aim.
Regards,
ZdeneK