BE_JPEG_Recompress

BE_JPEG_Recompress ( jpeg {; compressionLevel ; scale } )

Re-compresses the jpeg image file found at the container field jpeg, using a scaling factor and compression level.

 

Version : 3.2 : Changed the height and width to a scaling factor to better match the actual workings of the library used.

Version : 3.1 : Added.

 

Parameters

jpeg : a JPEG file stored in a container.
compressionLevel : a value between 1 and 100 (inclusive). The default value, for no compelling reason, is 75.
scale : a number for the scale of the resulting image.  The default value is 0.125.

 

Result : the newly compressed image container field data.  Errors can be captured in BE_GetLastError, which will be 0 for success.

 

Notes :

Use this function with a Set Field script step to convert one container to another.  It can be used to set the same field as the one referenced in the field parameter.

Values for the "scale" parameter are :

2
1.875
1.75
1.625
1.5
1.375
1.25
1.125
1
0.875
0.75
0.625
0.5
0.375
0.25
0.125

Any other values are rounded down to the nearest value, except values below 0.125 where it will use 0.125.

Have more questions? Submit a request

0 Comments

Article is closed for comments.