Hello!

I'm quite new to Magick++ and I have a big problem since some weeks.
I have a unsigned char array (pointer) with 76800 elements (320x240).
It's a gray scalled picture with one byte for each pixel.
I wrote a code where I reset every pixel, it was very slow but it worked fine. 
Now I discouvered blob and wrote this code:

  Magick::Blob image_blob(this->image,76800);
  Magick::Image image(Magick::Geometry(width,height),"blue");
  image.depth(8);
  image.size("320x240");
  image.type(Magick::GrayscaleType);
  image.read(image_blob);
  image.write("/tmp/magick_pp_test.jpg");

So I want wo convert this large blob in a jpeg file but the picture is always 
blue (it's the backgroundcolor I set at the beginning).
So what do I make wrong?
One possible solution would be to set image.magick() but I was not able to find 
out what i have to give him for a gray scalled picture.

Fabian
_______________________________________________
Magick-developers mailing list
Magick-developers@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-developers

Reply via email to