MagickCore can't sync pixel

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: MagickCore can't sync pixel

Post by magick »

Chances are you are using the Q16 version of ImageMagick. Multiply your color values by 257.
cam
Posts: 12
Joined: 2013-11-29T23:24:10-07:00
Authentication code: 6789

Re: MagickCore can't sync pixel

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: MagickCore can't sync pixel

Post by fmw42 »

you can check your version of IM with

convert -version
cam
Posts: 12
Joined: 2013-11-29T23:24:10-07:00
Authentication code: 6789

Re: MagickCore can't sync pixel

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: MagickCore can't sync pixel

Post 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.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: MagickCore can't sync pixel

Post by dlemstra »

Your q variable should be a PixelPacket*.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
cam
Posts: 12
Joined: 2013-11-29T23:24:10-07:00
Authentication code: 6789

Re: MagickCore can't sync pixel

Post by cam »

changed to PixelPaket* but it still nto working,

I posted all the code of the file, probably it will help
KayleJacob
Posts: 1
Joined: 2014-02-12T07:12:41-07:00
Authentication code: 6789

Re: MagickCore can't sync pixel

Post 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;
Post Reply