GetImageSizeWithSpecifiedType Method
Description
Pre-calculate the file size of the local image file that is saved from an image of a specified index in buffer.
ActiveX Edition | Plug-in Edition | Mac Edition |
---|---|---|
Since V5.1 | Since V5.1 | Since V6.4 |
Syntax
Long ObjectName. GetImageSizeWithSpecifiedType(Short sImageIndex, Short sImageType)
Parameters
Short sImageIndex: specifies the index of image in buffer. The index is 0-based.
Short sImageType: specifies the type of an image file.
Allowed Values |
Image Type |
0 | BMP, DIB |
1 | JPG, JPEG, JPE, JFIF |
2 | TIF, TIFF |
3 | PNG |
4 |
Return value
Long (byte).
-1 indicates failure. Other values indicate success.
When an error occurs and IfThrowException property is TRUE, an exception will be thrown.
When FALSE is returned or an exception is thrown, check ErrorCode property and ErrorString property for error information.
Remarks
None.
See Also
GetImageSize(), ChangeImageSize(), SaveAsBMP(), SaveAsJPEG(), SaveAsTIFF(), SaveAsPNG(), SaveAsPDF()