(Only works with JPG images) Define the settings used when loading an image with ofImage load(). There is 4 settings, that are all set to false by default : - accurate : the level of accuracy used to load the image - grayscale : if the image is colored or in grayscale - separateCMYK : separate the 4 colors layers of an image - exifRotate : rotate the image using Exif data
ofImageLoadSettings settings;
settings.accurate = true;
settings.grayscale = false;
settings.separateCMYK = false;
settings.exifRotate = false;
// Then load the image with these settings
ofImage myImg;
myImg.load("anImage.jpg", settings);
Documentation from code comments
\todo Needs documentation.
bool accurate
bool ofImageLoadSettings::accurate
Define the level of accuracy used to load the image.
True : more accurate, but slighly slower to load.
False : faster load, but slighly less accurate (default)
~~~~{.cpp}
ofImageLoadSettings settings;
settings.accurate = true;
// Then load the image with these settings
ofImage myImg;
myImg.load("anImage.jpg", settings);
~~~~
bool exifRotate
bool ofImageLoadSettings::exifRotate
Rotate according to the EXIF 'Orientation' tag if available. For example if the image was taken in portrait orientation, it exif data will show that it's orientation is "Vertical".
True : the image will be rotated using Exif data
False : the image won't be rotated (default)
~~~~{.cpp}
ofImageLoadSettings settings;
settings.exifRotate = true;
// Then load the image with these settings
ofImage myImg;
myImg.load("anImage.jpg", settings);
~~~~
bool grayscale
bool ofImageLoadSettings::grayscale
Set the loaded image to grayscale. Probably better to set it on load, performance wise.
True : grayscale image
False : normal color image (default)
~~~~{.cpp}
ofImageLoadSettings settings;
settings.grayscale = true;
// Then load the image with these settings
ofImage myImg;
myImg.load("anImage.jpg", settings);
~~~~
bool separateCMYK
bool ofImageLoadSettings::separateCMYK
Separate the 4 colors layers (Cyan, Magenta, Yellow & Black) of an image.
Only works with CMYB color images : it has to be converted with Photophoh / Gimp, to use a CMYB color space.
True : Separate 4 color layers
False : no color layers separation (deafault)
~~~~{.cpp}
ofImageLoadSettings settings;
settings.separateCMYB = true;
// Then load the image with these settings
ofImage myImg;
myImg.load("anImage.jpg", settings);
~~~~
Last updated 화요일, 19 11월 2024 17:24:29 UTC - 2537ee49f6d46d5fe98e408849448314fd1f180e
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue