ImageLoader.loadAsJpeg

Load image as jpeg.

When an image which has another file type, assertion error is thrown.

class ImageLoader
static
loadAsJpeg
(
string path
,
bool loadNoPixels = false
,,
bool cmyk = false
,
bool grayScale = false
,
int scale = 1
,
bool exifRotate = false
)

Parameters

path string

image file path

loadNoPixels bool

When this flag is supported by a plugin, load only header data and possibly metadata (including embedded thumbnail). When the flag is not supported, pixels are loaded.

quality JpegLoadQuality

When 'Fast' is selected, load the file as fast as possible, sacrificing some quality. When 'Accurate' is selected, load the file with the best quality, sacrificing some speed

cmyk bool

This flag will load CMYK bitmaps as 32-bit separated CMYK

grayScale bool

Load and convert to a 8-bit greyscale image (faster than loading as 24-bit and converting to 8-bit)

scale int

Load and resize the file such that size/X = max(width, height)/X will return an image scaled by 2, 4 or 8 (i.e. the most appropriate requested size).

exifRotate bool

Load and rotate according to Exif 'Orientation' tag if available

Return Value

Type: Image

loaded jpeg image

Meta