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");
}