Difference between revisions of "ImageInfo"

(Created page with "''New to Analytica 5.0'' == ImageInfo( image, item ) == Returns information about an in-memory image. «Image» is an image obtained from the Pict attribute of an o...")
 
(Pixel color components)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
[[Category:Image and canvas functions]]
 +
 
''New to [[Analytica 5.0]]''
 
''New to [[Analytica 5.0]]''
  
== ImageInfo( image, item ) ==
+
== 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]].
+
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:
 
Possible options for «item» are:
Line 16: Line 18:
 
** <code>'TIF'</code>
 
** <code>'TIF'</code>
 
* <code>'BitsPerPixel'</code>: 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).
 
* <code>'BitsPerPixel'</code>: 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).
 +
* <code>'Color'</code>: (new to [[Analytica 5.1]]) The color of the pixel at «x», «y» as an [[Color_parameters#Color_integers|ARGB color integer].
 +
*<code>'Red'</code>: (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.
 +
*<code>'Green'</code>: (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.
 +
*<code>'Blue'</code>: (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.
 +
*<code>'Alpha'</code>: (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.
 +
*<code>'Red255'</code>: (new to [[Analytica 5.1]]) The red component of the color of the pixel at «x», «y» as an integer from 0 to 255.
 +
*<code>'Green255'</code>: (new to [[Analytica 5.1]]) The green component of the color of the pixel at «x», «y» as an integer from 0 to 255.
 +
*<code>'Blue255'</code>: (new to [[Analytica 5.1]]) The blue component of the color of the pixel at «x», «y» as an integer from 0 to 255.
 +
*<code>'Alpha255'</code>: (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 ==
 
== See Also ==

Latest revision as of 21:02, 18 December 2017


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.