Scripting Function - SaveToSubFolderJpegWithTargetSize
The function specifies that each processed image file will be saved to a specified sub folder beneath each original image files location. The function is special version of SaveToSubFolder that saves images in the JPEG image file format. The function allows you to specify a target file size for the processed images if 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%).
Syntax
SaveToSubFolderJpegWithTargetSize subfoldername As StringValueSubFolderName, targetsize As IntegerValueGreaterEqualOne, writeexifinformation As BooleanValue
Parameters
subfoldername - the sub folder name where processed image files will be saved. Note that if the specified sub 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
Example
The following example specifies that each processed image should be saved as the JPEG image file format to a sub folder named "Processed" beneath the original location of each image. Each processed image will be saved with a file size no larger than 400KB (where possible), and EXIF Meta Information will be copied from each original image:
SaveToSubFolderJpegWithTargetSize "Processed", 400, True
Version Information
Supported in Multiple Image Resizer .NET v2.0.1.0
See Also