Page 1 of 1

Can't create new TIFF in LAB Colorspace

Posted: 2012-06-30T12:35:06-07:00
by cjmi
The code below creates out.tif

identify -verbose out.tif (using 6.7.8-0 w/ HDRI configure option) states out.tif is in sRGB colorspace.

Sorry if I'm doing it wrong.

Code: Select all

#include <list>
using namespace std;

#include "Magick++.h"
using namespace Magick;

int main(int argc, char** argv) {
   InitializeMagick(*argv);
   Image image(Geometry(100, 100), ColorRGB(0, 0, 0)); // This won't be in LAB, just start us off with black background
   image.colorSpace(LabColorspace);
   image.quantizeColorSpace(LabColorspace);
   list<Drawable> drawList;
   drawList.push_back(DrawableFillColor(ColorRGB(0.5, 0, 0)));
   drawList.push_back(DrawableRectangle(0, 0, 99, 99)); // This should fill the entire document with LAB 50, 0, 0 (gray)
   image.draw(drawList);
   image.write("out.tif");
}

Re: Can't create new TIFF in LAB Colorspace

Posted: 2012-07-01T18:37:35-07:00
by magick
The rendering engine works in the sRGB colorspace. Try converting to Lab after your objects are drawn.