convertPicture
convertPicture(type: Integer): Binary;
The convertPicture method of the Binary primitive type returns a copy of a binary picture image converted to the picture type specified in the type parameter. The types of images that can be converted (by using the
-
Bitmap (.bmp)
-
Tag Image File Format (.tif)
-
Joint Photographic Experts Group (.jpg)
-
JPG 2000 (.jp2)
-
Portable Network Graphics (.png)
A
Converting to a .tif image type file results in a tiff packbits type image. Converting to a .jpg image results in loss of quality in the picture, as Joint Photographic Experts Group (JPEG) uses a lossy compression algorithm.
As the Portable Network Graphics image uses a lossless compression algorithm, it provides clarity and retains definition for images, but the files may be larger than JPEG files.
An exception is raised if this method is invoked from a server method.
You cannot convert images to GIF picture files.
See also the convertToFile method of the Binary primitive type.