Data Conversion

IceMan Reference Guide

Data Conversion

ice.Image Dither(amplitude, seed)
amplitude A random number "uniformly" distributed in the range [-amplitude, amplitude] is added to the image (float).

seed: Integer number to seed the random number generator (int).

Dither an image suitable to quantizing to a lower bit depth.

Note: There is no actual type-conversion. If you need type conversion, you must use addtionally call TypeConvert.


	t = floatImage.Dither(1.0/256.0, 1)
	display = t.TypeConvert(ice.constants.FRACTIONAL)
			

ice.Image D1ToRGB(colorStandard)
colorStandard: One of IceColorStandard (int):
  • ice.constants.PAL
  • ice.constants.NTSC

The image is assumed to be legal D1 (720x486, two channel YUV/YIQ, chroma-subsampled), and the result is an RGB image, appropriately gamma corrected.

Note: Gamma correction values are different for PAL and NTSC, as are some intermediate color spaces.

ice.Image RGBToD1(colorStandard)
colorStandard: PAL or NTSC (int).

Return an image encoded in D1 (720x486, two-channel YUV/YIQ, chroma-subsampled, gamma corrected) format.

Note: This operation performs more than a simple data conversion!

ice.Image TypeConvert(destinationType)
destinationType: Data type to convert to one of IceComponents constants:
  • ice.constants.FRACTIONAL
  • ice.constants.FIXED_POINT
  • ice.constants.FLOAT
  • ice.constants.DOUBLE

Convert an image to a different type. Attempts to convert to the same type are legal, but do nothing.