![]() The ColorSpace is the default sRGB space. All of the bits in each mask mustīe contiguous and fit in the specified number of least significant bits If amask is 0, pixel values do not containĪlpha information and all pixels are treated as opaque, which means Integer pixel contain the green component bmask - specifies a mask indicating which bits in anĬontain the red, green and blue color samples and the alpha sample, Integer pixel contain the red component gmask - specifies a mask indicating which bits in an rmask - specifies a mask indicating which bits in an The sum of the number of bits in the masks. Parameters: bits - the number of bits in the pixel values for example, Or DataBuffer.TYPE_INT that can hold a single pixel. Is the smallest of DataBuffer.TYPE_BYTE, DataBuffer.TYPE_USHORT, Transparency value is Transparency.OPAQUE. Of least significant bits of an int pixel representation. In each mask must be contiguous and fit in the specified number As pixel values do notĬontain alpha information, all pixels are treated as opaque, which That indicate which bits in an int pixel representationĬontain the red, green and blue color samples. See Also: ColorModel,Ĭonstructs a DirectColorModel from the specified masks YouĬan subclass this class for other reasons, but you cannot override The implementations of the methods here that are marked final. Underlying native graphics code makes assumptions about the layoutĪnd operation of this class and those assumptions are reflected in Many of the methods in this class are final. The default RGB ColorModel specified by theĭirectColorModel with the following parameters: This color model is similar to an X11 TrueColor visual. Representation will not throw an IllegalArgumentException Of pixel data will be done according to the masks of theĪ single int pixel representation is valid for all objects of thisĬlass, since it is always possible to represent pixel values used with However, if they are different, the color interpretation SampleModel and the ColorModel would be the ![]() For example, a DirectColorModel can be used inĬonjunction with a SinglePixelPackedSampleModel toĬonstruct a BufferedImage. Typically used with image data which uses masks to define packed The translation from pixel values to color/alpha components forĭisplay or processing purposes is a one-to-one correspondence of Index 3 corresponds to the alpha sample, if present.Index 0 corresponds to red, index 1 to green, and index 2 to blue. The first three indices refer to color samples.If no alpha is present, or 3 if an alpha is present. Masks are identified by indices running from 0 through 2.TheĬorrespondence of masks and color/alpha samples is as follows: The single int pixel representation used by other methods. Must be contiguous and masks must not overlap. Types supported are DataBuffer.TYPE_BYTE,ĭataBuffer.TYPE_USHORT, and DataBuffer.TYPE_INT.Ĭolor and alpha samples are stored in the singleĮlement of the array in bits indicated by bit masks. Pixel representation of type transferType, the array For those methods that use a primitive array There must be three color samples in the pixel values and there canīe a single alpha sample. The getMaxValue() method must be 1.0 (these min/max Method of ColorSpace must be 0.0, and the maximum value obtained via Normalized component value obtained via the getMinValue() In addition, for each component of the ColorSpace, the minimum This class can be used only with ColorSpaces of type ColorSpace.TYPE_RGB. Samples for a single pixel into a single int, short, or byte quantity. The DirectColorModel class is a ColorModelĬlass that works with pixel values that represent RGBĬolor and alpha information as separate samples and that pack all
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |