Multiple Image Resizer .NET v4.5.2
Help Documentation

Scripting Function - SaveToFolderJpegWithTargetSize

The function specifies a folder where each processed image file will be saved. The function is special version of SaveToFolder that saves images in the JPEG image file format. The function allows you to specify a target file size for the processed images and if the any existing EXIF Meta Information from each original image file should be added to each processed image. Use the target file size to set the maximum size in kilobytes of the processed image files (note that the function automatically calculates the JPEG quality setting needed to achieve target file size, if the file size cannot be achieved then the function will save the processed image with a JPEG quality setting of 1%).



SaveToFolderJpegWithTargetSize foldername As StringValueFolderName, targetsize As IntegerValueGreaterEqualOne, writeexifinformation As BooleanValue, recreateoriginalfolderstructure As BooleanValue



foldername - the full path to the folder where processed image files will be saved. Note that if the specified folder does not exist it will be created.

targetsize - the file size in kilobytes that you are trying to achieve when the image files are saved.

writeexifinformation - the write EXIF Meta Information flag

recreateoriginalfolderstructure - Optional Parameter - When set to True the original folder structure of the images will be created under the output folder. When set to False or not included in the function call the processed images will be saved into the output folder.



The following example specifies that all the processed images should be saved as the JPEG image file format to a folder named "temp" in the root of the C: drive. Each processed image will be saved with a file size no larger than 250KB (where possible), and EXIF Meta Information will not be copied from each original image:

SaveToFolderJpegWithTargetSize "c:\temp", 250, False


Version Information

Supported in Multiple Image Resizer .NET v2.0.0.0
Optional Parameter recreateoriginalfolderstructure added in Multiple Image Resizer .NET v2.5.0.0


See Also