ImageTools - Maple Help

Online Help

All Products    Maple    MapleSim


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

ImageTools

  

Preview

  

preview an image

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

Preview( img, MaxH, MaxW, opts )

Parameters

img

-

Image; the image to preview

MaxH

-

(optional) posint; desired maximum height of the preview image

MaxW

-

(optional) posint; desired maximum width of the preview image

opts

-

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

Options

• 

chars = string

  

Specifies the characters to use when the output = text option is selected. The characters should be ordered from darkest to lightest, with the darkest listed first. The default is "@Oo*+=~- ".

• 

method = bspline or nearest

  

Specifies the mode used to scale the image. See Scale. The default is bspline.

• 

output = image or text

  

Specifies whether the output is an image or a text representation of the image. If the latter, the characters in the chars option represent the shades of gray in the image. The default is image, unless interface(plotdevice) is char.

Description

• 

The Preview command generates a plot of an image and displays it in the worksheet.

• 

The img parameter is the image to be displayed.

• 

The optional parameters MaxH and MaxW are the maximum height and width, respectively, to which the preview image is scaled. The units are pixels if the output option is image; otherwise they are characters. If omitted, suitable defaults are used.

• 

The image is reduced to thumbnail size for previewing, and is displayed with axes corresponding to the pixel coordinates of the image. This is useful in determining where to crop an image.

Examples

imagefilecatkerneloptsdatadir,/images/fjords.jpg:

withImageTools:

imgReadimagefile:

Previewimg

@@@@@@O@@OO@@O@@O@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@@
@OOOOOOOOOOOOOOOOOOOOOOOOOoOOOo*+*oOOOOOOOOOOOOOOOOOO@
@@@OOOOOOOOooOOOOOOOOOOOOO+=++**++*+oOOOOOOOOOOOOOOO@@
OOOOO*~  ~**~o*+***ooOOOOO*-=o*~~*O+~~==*oOOOOOOOOOOOO
OOO*-    ~o+~+o*~~*ooOOOOo~-=~~-~+o+~~==~~~=oOOO@@OOO@
Oo-    ---~  =**=~~*OOOOo~ ~---~=+==~~=++==~~=oOOOOOOO
+  -----     ~++===+OOOO*- --~~~====~~~=+++==~=*OOOOOO
-------   ----~++++*OOOOo~ ~~~~~+*+=~~~=+=++====oOO@@@
=~-----   =+=~~***oo~~=+*~-~==+*oo=======++++====OOO@O
+=~----   -===+**oooOoo*+~=++++**+=========++++===*oo*
**=~~-    -~++*oooooOOOO*+**++**++=========++===+++++*
o*+~~-    -~=*oOOOooOOO+=********++=~=+=====+==++++++=
**+=~-    -~~=+ooo*oOo~ -~=++++++++=~=+========++++++=
***+=~  --~~  -~~=++*=~=o*=~~=+++++==+++=====++++++++=
*+**++=~-~=+~O*=*O**++*o@*=~=+++*++**+++====+++++*+++=
**++**++==++~+OoOo*ooo*o**+++**o@+~+++++====++***+++++
o**++***+++++=O@O+-----=**+*oOOO@O~~=++++===++++++++++
o**+++***+++++==~--      ~*+~o@O@@*==++++===++++++++++
oo**++****++++~----     ~*+ ~OOO@@@~~+++++++++++++++==
oo**+++****++=      ---=*o*-~OOO@@@- ~=++++++++++++++=
*o*********++~        ~*+Oo==o@@@@@- -~====++++++++++=
************=        =+- o* =o@@@@@~---~~=+++++++++++=

Previewimg,method=nearest

@@OO@OOOOOoOOOOOOOOOOOOoO@@O@@O@@O@OO@@@@@@OO@O@@@@@@@
@@OO@OOOOOOOOOOOOOO@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@OOOOOOOOOOOOOOOOOOo+OOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOoOOOOOOOOOOOOoOOOOOOoooooOOOOO@@@OOOOOOOOOOO
O@@@@OOOOooOO*OOOOOooOOOOo+++*+**~*=oO*OOOOOOOOOOOOOOO
OOOOOOO  -=* O@OOoOoOOOOOOO -*O-++** - -@@OOOOOOOOOOOO
OOOO      *o *o*=~-o=OOoOO~-==~-~=*o-~+=~~~-@OOO@@OOOO
OOo    --~-- ~+++~~=OOoOO  =~-= ~++=~~++==~=~~OOOOOOOO
*  ---~~-    ==+*=~=OOooO  --~=~==+=~=~=*++==~~*OOOOOO
~- ----   - --~*==~~Ooooo- ~=~~~*+++~=~~+=++==~~OOOOOO
=~~----   =*=~=o=o*@ --oo--~=~+**@~=~~===+==+====@OOOO
++= ~---   ~+=~o+*oOooO=~ ==++++**==~=+==++==+====@OOO
*++-=--    ~=++ooOoOoooOo+***+**+*===~=======+==+*+*++
o**~~ -   -==+*OOooooOoO+******+*++=~~===~====+==+=+==
***==~-   --~++ooo*OOoo -~~+++++=++=~=++~======+=*+=+=
***++-  ---=-  -=~+OO~-~===~~~+=++++=+++====+=+=*+*+=+
+++*+++--~~+-@*=+@+O-=**@==~=+++**+o++=+=====O+**o++++
**+*+++++==+*o*o*@=OO@*oO+==++++oo~*+++++====++o**+**+
***++**++==++=+@@*----~+Oo=oo+o+O@-===+++====+*+++++==
o**+++**++=+=+-=~~--------*O *OO@@=~=+=+==++=+++++=+++
*o*+*+=+**++++=~--~     -**  oOo@@@ ~=++*=++=+*++=+=+=
oo***++***++++-   --~-- *+O ~oOo@@@--~+++===+=+*=+++==
*oo***+****+++         *ooO~-O@@@@@   =~=++=++=++++=+=
*****++*****+        =*  oO  o@@@@@~- -~=~==+++=*=*+++

Previewimg,output=text

@@@@@@O@@OO@@O@@O@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@@
@OOOOOOOOOOOOOOOOOOOOOOOOOoOOOo*+*oOOOOOOOOOOOOOOOOOO@
@@@OOOOOOOOooOOOOOOOOOOOOO+=++**++*+oOOOOOOOOOOOOOOO@@
OOOOO*~  ~**~o*+***ooOOOOO*-=o*~~*O+~~==*oOOOOOOOOOOOO
OOO*-    ~o+~+o*~~*ooOOOOo~-=~~-~+o+~~==~~~=oOOO@@OOO@
Oo-    ---~  =**=~~*OOOOo~ ~---~=+==~~=++==~~=oOOOOOOO
+  -----     ~++===+OOOO*- --~~~====~~~=+++==~=*OOOOOO
-------   ----~++++*OOOOo~ ~~~~~+*+=~~~=+=++====oOO@@@
=~-----   =+=~~***oo~~=+*~-~==+*oo=======++++====OOO@O
+=~----   -===+**oooOoo*+~=++++**+=========++++===*oo*
**=~~-    -~++*oooooOOOO*+**++**++=========++===+++++*
o*+~~-    -~=*oOOOooOOO+=********++=~=+=====+==++++++=
**+=~-    -~~=+ooo*oOo~ -~=++++++++=~=+========++++++=
***+=~  --~~  -~~=++*=~=o*=~~=+++++==+++=====++++++++=
*+**++=~-~=+~O*=*O**++*o@*=~=+++*++**+++====+++++*+++=
**++**++==++~+OoOo*ooo*o**+++**o@+~+++++====++***+++++
o**++***+++++=O@O+-----=**+*oOOO@O~~=++++===++++++++++
o**+++***+++++==~--      ~*+~o@O@@*==++++===++++++++++
oo**++****++++~----     ~*+ ~OOO@@@~~+++++++++++++++==
oo**+++****++=      ---=*o*-~OOO@@@- ~=++++++++++++++=
*o*********++~        ~*+Oo==o@@@@@- -~====++++++++++=
************=        =+- o* =o@@@@@~---~~=+++++++++++=

PreviewCheckerboard10,4,4,20,20,chars=* ,output=text

     *****     *****
     *****     *****
     *****     *****
*****     *****     
*****     *****     
*****     *****     
     *****     *****
     *****     *****
     *****     *****
*****     *****     
*****     *****     
*****     *****     

See Also

ImageTools

ImageTools[View]

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