ImageInfo


New to Analytica 5.0

ImageInfo( image, item, x,y )

Returns information about an in-memory image. «Image» is an image obtained from the Pict attribute of an object that has an image, or from functions such as ReadImageFile, ReadFromURL, CanvasImage (see Drawing images), or ImageFromHex. The «x» and «y» parameters are optional and only used when querying information about individual pixels.

Possible options for «item» are:

  • 'Width': The width of the image in pixels.
  • 'Height': The height of the image in pixels.
  • 'Type': The mime type of the image as currently stored in memory. Possible types include these (others are also possible):
    • 'PNG'
    • 'JPG'
    • 'BMP'
    • 'WMF'
    • 'TIF'
  • 'BitsPerPixel': The color depth. The most common values are 24 (8 bits each for red, green and blue) and 32 (8 bits each for alpha, red, green and blue).
  • 'Color': (new to Analytica 5.1) The color of the pixel at «x», «y» as an [[Color_parameters#Color_integers|ARGB color integer].
  • 'Red': (new to Analytica 5.1) The red component of the color of the pixel at «x», «y» on a scale from 0.0 to 1.0.
  • 'Green': (new to Analytica 5.1) The green component of the color of the pixel at «x», «y» on a scale from 0.0 to 1.0.
  • 'Blue': (new to Analytica 5.1) The blue component of the color of the pixel at «x», «y» on a scale from 0.0 to 1.0.
  • 'Alpha': (new to Analytica 5.1) The alpha (opaqueness) component of the color of the pixel at «x», «y» on a scale from 0.0 to 1.0. A value of 0.0 means fully transparent, a value of 1.0 means fully opaque. This is only meaningful when the image has 32-bits per pixel.
  • 'Red255': (new to Analytica 5.1) The red component of the color of the pixel at «x», «y» as an integer from 0 to 255.
  • 'Green255': (new to Analytica 5.1) The green component of the color of the pixel at «x», «y» as an integer from 0 to 255.
  • 'Blue255': (new to Analytica 5.1) The blue component of the color of the pixel at «x», «y» as an integer from 0 to 255.
  • 'Alpha255': (new to Analytica 5.1) The alpha (opaqueness) component of the color of the pixel at «x», «y» as an integer from 0 to 255. A value of 0 means fully transparent, a value of 255 means fully opaque. This is only meaningful when the image has 32-bits per pixel.

When using the pixel color options, pass arrays for «x» and «y» to "explode" the image, or a subset of the image, in a single call.

See Also

Comments


You are not allowed to post comments.