Spectrum approximating an RGB triple.
@param r The red component.
@param g The green component.
@param b The blue component.
@return The new Spectrum.
Raster from sRGB to the color space represented by this class. If the destination WritableRaster is null, a new WritableRaster will be created. The Rasters are treated as having no alpha channel, i.e., all bands are color bands. If required by the underlying transformation, integral data will be normalized according to the number of bits of the respective component; floating point data should be between 0.0 and 1.0. All integral data are assumed to be unsigned; signed data should be shifted by the caller before invoking this method.
@param src the source Raster to be converted.
@param srcComponentSize array that specifies the number of significantbits per source color component; ignored for floating point data. If null defaults to the value returned by src.getSampleModel().getSampleSize().
@param dest the destination WritableRaster,or null.
@param destComponentSize array that specifies the number of significantbits per destination color component; ignored for floating point data. If null, defaults to the value returned by dest.getSampleModel().getSampleSize(), or the sample size of the newly created destination WritableRaster if dest is null.
@return dest color converted from srcor a new, WritableRaster containing the converted pixels if dest is null.
@exception IllegalArgumentException if src isnull, the number of source or destination bands does not equal the number of components of the respective color space, or either component size array is non-null and has length not equal to the number of bands in the respective Raster.
This method transforms color values using algorithms designed to produce the best perceptual match between input and output colors. In order to do colorimetric conversion of color values, you should use the toCIEXYZ method of the CS_sRGB color space to first convert from the input color space to the CS_CIEXYZ color space, and then use the fromCIEXYZ method of this color space to convert from CS_CIEXYZ to the output color space. See {@link #toCIEXYZ(float[]) toCIEXYZ} and{@link #fromCIEXYZ(float[]) fromCIEXYZ} for further information.
@param rgbvalue a float array with length of at least 3 @return a float array with length equal to the number ofcomponents in this ColorSpace @throws ArrayIndexOutOfBoundsException if array length is notat least 3
Raster from sRGB to the color space represented by this class. If the destination WritableRaster is null, a new WritableRaster will be created. The Rasters are treated as having no alpha channel, i.e., all bands are color bands. If required by the underlying transformation, integral data will be normalized according to the number of bits of the respective component; floating point data should be between 0.0 and 1.0. All integral data are assumed to be unsigned; signed data should be shifted by the caller before invoking this method.
@param src the source Raster to be converted.
@param srcComponentSize array that specifies the number of significantbits per source color component; ignored for floating point data. If null defaults to the value returned by src.getSampleModel().getSampleSize().
@param dest the destination WritableRaster,or null.
@param destComponentSize array that specifies the number of significantbits per destination color component; ignored for floating point data. If null, defaults to the value returned by dest.getSampleModel().getSampleSize(), or the sample size of the newly created destination WritableRaster if dest is null.
@return dest color converted from srcor a new, WritableRaster containing the converted pixels if dest is null.
@exception IllegalArgumentException if src isnull, the number of source or destination bands does not equal the number of components of the respective color space, or either component size array is non-null and has length not equal to the number of bands in the respective Raster.
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |