Can't create new TIFF in LAB Colorspace

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
cjmi
Posts: 11
Joined: 2012-06-28T20:31:04-07:00
Authentication code: 13

Can't create new TIFF in LAB Colorspace

Post 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");
}
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Can't create new TIFF in LAB Colorspace

Post by magick »

The rendering engine works in the sRGB colorspace. Try converting to Lab after your objects are drawn.
Post Reply