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.
I want to achieve the same result using MagickWand. Please look at my code. I think, I made a mistake in passing the parameters of PixelSetHSL method. What is the correct way to pass it?
Note that the first one has to be cast to double (or written as 120.0) so that the division isn't done as integers which would result in zero.
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Note that the first one has to be cast to double (or written as 120.0) so that the division isn't done as integers which would result in zero.
Pete
Hello @el_supremo, it's not working. It gives me a black image.
After some digging I found that I need to divide first argument(Hue) by 360. I've got an idea from second and third parameters as you have divided those parameters by 100, I thought the first one(Hue) would be divided by 360 and yes the solution works. Thank you @el_supremo.
So the method looks like this.
I, obviously, hadn't used HSL before. Hue is specified in degrees (thus the /360.0) and Saturation and Lightness are fractions from zero to one (often specified as a percentage).
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.