read an image from a file or URL - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Image Processing : ImageTools Package : ImageTools/Read

ImageTools[Read] - read an image from a file or URL

Calling Sequence

Read( file, img, opts )

Read( url, img, opts )

Parameters

file

-

string; the pathname of the image file to read

url

-

string; URL address of an image file to read

img

-

(optional) Image; rtable to read image into

opts

-

(optional) equation(s) of the form option = value; specify options for the Read command

Description

• 

The Read command returns an Image read from an image file in one of the supported formats. After completing the read, the file is closed.

• 

The Read command can read most variations of the supported formats. Those that are not grayscale, RGB, or RGBA, such as YCbCr or color-mapped images, are converted to one of the supported formats while being read.

• 

The file parameter is the name of the file and it must be a Maple string. If the format option is not provided, the file format is determined from the extension of the file name. For example, the string image.jpg is read as a JPEG file.

• 

The optional img parameter is a data structure into which the image is written.  It must be of type Image and have the proper dimensions and layers for the image. Using the img parameter is equivalent to using the output option.

Examples

withImageTools:img:=Create100,200,r,c→0.251+sin0.005+0.003cc1+sin0.15r,r,c→0.51+ⅇr50.sinc20.,r,c→r100.:

Writegood_img.jpg,img

4066

(6.1)

img2:=Readgood_img.jpg

img2:= 1..100 x 1..200 x 1..3 ArrayData Type: float8Storage: rectangularOrder: C_order

(6.2)

Embedimg2

See Also

ImageTools, ImageTools[Formats], ImageTools[RGBtoGray], ImageTools[Write]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam