ColorTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Packages : ColorTools : ColorTools/ColorsFromImage

ColorTools

  

ColorsFromImage

  

extract the colors from an image

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

ColorsFromImage(filename)

Parameters

filename

-

the name of a file, as a string

Options

• 

space : string; the color space of the returned colors

• 

number : posint; limit on how many colors to process

Description

• 

This command extracts the colors from an image file into a list of Color objects.

Examples

withColorTools:

imgfilecatkerneloptsdatadir,/images/rollercoaster.jpg:

ImageTools:-EmbedImageTools:-Readimgfile

fullColorsFromImageimgfile:

numelemsfull

805

(5.1)

full700..725

RGB : 0.59 0.666 0.815,RGB : 0.218 0.255 0.555,RGB : 0.127 0.113 0.125,RGB : 0.269 0.281 0.322,RGB : 0.48 0.535 0.623,RGB : 0.619 0.698 0.828,RGB : 0.614 0.692 0.825,RGB : 0.254 0.3 0.624,RGB : 0.447 0.51 0.656,RGB : 0.611 0.69 0.819,RGB : 0.522 0.535 0.553,RGB : 0.258 0.209 0.228,RGB : 0.435 0.44 0.492,RGB : 0.551 0.457 0.192,RGB : 0.56 0.609 0.698,RGB : 0.477 0.42 0.394,RGB : 0.443 0.3 0.176,RGB : 0.308 0.341 0.536,RGB : 0.322 0.209 0.235,RGB : 0.401 0.335 0.294,RGB : 0.594 0.669 0.794,RGB : 0.599 0.677 0.807,RGB : 0.602 0.681 0.81,RGB : 0.58 0.657 0.806,RGB : 0.217 0.257 0.549,RGB : 0.33 0.346 0.384

(5.2)

Compatibility

• 

The ColorTools[ColorsFromImage] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

ColorTools

ColorTools/Color

ColorTools/ColorSpaces

ImageTools

 


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