jpegread, var, file [, header,
shrink=shrink] [, /greyscale]
jpegread(var, file [, header,
shrink=shrink] [, /greyscale])
header is not
specified, then any header is displayed on the screen. If
shrink is specified, then the image is shrunk by the
indicated factor (which must be 1, 2, 4, or 8) before being returned.
/greyscale is selected, then a greyscale image is returned
even if the file contains a color image. Specifying
and specifying a non-unit value for
shrink decreases the amount
of time that the reading and decompression takes. rgb values are
returned in a three-dimensional array, with the first dimension (of size
three) selecting the color and the remaining dimensions selecting
location. Greyscale values are returned in a two-dimensional array.
The function returns
1 on success,
0 on failure. The
subroutine generates an error on failure.
LUX uses version 6b of the Independent jpeg Group’s jpeg library to implement this routine.
See also: jpegwrite, fzread, gifread