Page 1 of 1
Re: MagickCore can't sync pixel
Posted: 2013-12-06T05:08:37-07:00
by magick
Chances are you are using the Q16 version of ImageMagick. Multiply your color values by 257.
Re: MagickCore can't sync pixel
Posted: 2013-12-06T10:07:20-07:00
by cam
hi friend,
I am sure i am using Q8 version and the image i have read from dile is 24bits of depth. Could you post a working way to get a and set a pixel in MagickCore?.
I am pretty newbie in this library and trying to start with the basics.
Thanks for your time.
Re: MagickCore can't sync pixel
Posted: 2013-12-06T10:33:58-07:00
by fmw42
you can check your version of IM with
convert -version
Re: MagickCore can't sync pixel
Posted: 2013-12-06T11:28:35-07:00
by cam
hello,
It says:
Version: ImageMagick 6.8.7-8 Q8 i686 2013-12-01
http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib djvu fontconfig freetype jng jp2 jpeg lcms lqr openexr pangocairo png tiff x xml zlib
I have Q8 version, i really don't know what is happening.
Do you have an explample of what i want to do?. Thank you very much.
Re: MagickCore can't sync pixel
Posted: 2013-12-06T12:05:24-07:00
by fmw42
Sorry I only work with the command line and not any of the APIs. Perhaps one of the other users who know more about this API can help further.
Re: MagickCore can't sync pixel
Posted: 2013-12-06T15:27:08-07:00
by dlemstra
Your q variable should be a PixelPacket*.
Re: MagickCore can't sync pixel
Posted: 2013-12-06T19:51:25-07:00
by cam
changed to PixelPaket* but it still nto working,
I posted all the code of the file, probably it will help
Re: MagickCore can't sync pixel
Posted: 2014-02-12T07:19:36-07:00
by KayleJacob
From the example provided, your imagen variable remains in a NULL pointer. It should be assigned by the return value of ReadImage.
Code: Select all
imagen = ReadImage(imagen_info, exception);
The only other issue I see would be the assignment of color values on the PixelPacket. Assuming your working with RGB, you would need to calculate the Quantum color value.
Code: Select all
q->red = 255 * QuantumRange;
q->green = 123 * QuantumRange;
q->blue = 220 * QuantumRange;