
188 Appendix B
•
•
•
•
What’s the best method for color correcting a Grayscale image?
To maintain compatibility with previous versions of MediaRich, Grayscale images may be
treated in the same manner as RGB images. However, this assumes that the default RGB
colorspace uses equal amounts of red, green, and blue to represent gray, and that the
transform from Grayscale to RGB is linear.
If a profile is available for your Grayscale images, better results will be obtained by using
the Grayscale profile to color correct the Grayscale image to RGB before processing it as an
RGB image.
How do I treat all images as RGB images?
If you are not concerned about precise color conversions, the loadAsRGB method has been
provided as an add-on to the media object in the file: Scripts/Sys/media.ms.
This method loads an image, and if the image colorspace is not RGB, it converts the image
to RGB using the embedded profile, default source, and destination profiles defined in the
global.properties file. If the image has an embedded profile, it is used as the source. Here
is an example of how to use the loadAsRGB method:
#include "Sys/media.ms"
image = new Media();
image.loadAsRGB(name @ "myImage.tif");
Now, irrespective of the colorspace of the image stored in myImage.tif, the image is an
RGB image.