Search found 62 matches

by rpatelob
2017-05-24T05:08:29-07:00
Forum: MagickWand
Topic: Level Adjustments on Image
Replies: 2
Views: 13116

Level Adjustments on Image

There is a function MagickLevelImage for level adjustment. I'm trying to apply reverse level adjustment. How do I do that? Check out below code. convert test.png -level 0,1000 levelP.png convert test.png +level 0,1000 levelM.png For first command I just need to call MagickLevelImage(wand, 0, 1, 1000...
by rpatelob
2017-05-23T22:07:03-07:00
Forum: MagickWand
Topic: Equivalent of -colors 2.
Replies: 12
Views: 24176

Re: Equivalent of -colors 2.

snibgo wrote:
2017-05-23T07:44:27-07:00
In what? The command or C code?
Using C code. The CLI result was perfect, I wanted the same in C. So the RiemersmaDitherMethod worked.
by rpatelob
2017-05-23T07:18:37-07:00
Forum: MagickWand
Topic: Equivalent of -colors 2.
Replies: 12
Views: 24176

Re: Equivalent of -colors 2.

There are only two dithering methods: FloydSteinberg and Riemersma. As I suspected, you have used different methods. So the results are different. With RiemersmaDitherMethod I got the same result. Just a quick question. How do I know that which method I need to use? Because in one of my examples I ...
by rpatelob
2017-05-23T06:31:21-07:00
Forum: MagickWand
Topic: Equivalent of -colors 2.
Replies: 12
Views: 24176

Re: Equivalent of -colors 2.

Yes, the images are different. Perhaps they used different dithering methods. What was your command? What was your C code? Please check command and C code. convert -size 20x640 gradient: -rotate 90 -colors 2 -colorspace gray -auto-level test.jpg MagickWand * wand; PixelWand * PW1; size_t newHeight ...
by rpatelob
2017-05-23T05:17:27-07:00
Forum: MagickWand
Topic: Equivalent of -colors 2.
Replies: 12
Views: 24176

Re: Equivalent of -colors 2.

Hello @el_supremo,
One quick question, there are two ways to achieve gradient using PixelIterator and just using MagickReadImage(m_wand,"gradient:white-black");
Which one is the recommend solution for gradient?
by rpatelob
2017-05-23T05:16:38-07:00
Forum: MagickWand
Topic: Equivalent of -colors 2.
Replies: 12
Views: 24176

Re: Equivalent of -colors 2.

Hello @el_supremo, The expected result is not the same. It looks like similar but not the same. Please check two images Using CLI https://drive.google.com/file/d/0B-HZjmyodj8jbm5JVktJUzBONWM/view?usp=sharing Using C Code https://drive.google.com/file/d/0B-HZjmyodj8jVS1pck5zeVJDRU0/view?usp=sharing
by rpatelob
2017-05-22T07:49:58-07:00
Forum: MagickWand
Topic: Help me to find high saturation and brightness colors.
Replies: 18
Views: 41640

Re: Help me to find high saturation and brightness colors.

Yes sure! Here is the code. I have skipped all other operations. Please check my below code, you will get the Sparse Colors. size_t height = MagickGetImageHeight(wand); size_t width = MagickGetImageWidth(wand); size_t spares_index = 0; // Allocated enough memory to hold Sparse Color data double * sp...
by rpatelob
2017-05-19T07:14:29-07:00
Forum: MagickWand
Topic: Help me to find high saturation and brightness colors.
Replies: 18
Views: 41640

Re: Help me to find high saturation and brightness colors.

Thank you @snibgo
I have done it. :D
by rpatelob
2017-05-17T07:35:24-07:00
Forum: MagickWand
Topic: Help me to find high saturation and brightness colors.
Replies: 18
Views: 41640

Re: Help me to find high saturation and brightness colors.

% o arguments: array of floating point arguments for this method-- % x,y,color_values-- with color_values given as normalized values. Yes, you are right but how do I get those values "x,y, color_values" in C? In CLI, the first convert command gives me those values. And the second convert command us...
by rpatelob
2017-05-17T06:41:53-07:00
Forum: MagickWand
Topic: Help me to find high saturation and brightness colors.
Replies: 18
Views: 41640

Re: Help me to find high saturation and brightness colors.

@snibgo, Thank you. As you have suggested. I got the output from first command then saved it into text file. In the second convert I read that text file and I got the result. convert one.jpg -scale '50x50!' -depth 8 '(' -clone 0 -colorspace HSB -channel gb -separate +channel -threshold 50% -compose ...
by rpatelob
2017-05-17T04:30:43-07:00
Forum: MagickWand
Topic: Help me to find high saturation and brightness colors.
Replies: 18
Views: 41640

Help me to find high saturation and brightness colors.

I have a below command and trying to achieve the same in C. convert one.jpg -scale '50x50!' -depth 8 \ '(' -clone 0 -colorspace HSB -channel gb -separate +channel -threshold 50% -compose multiply -composite ')'\ -alpha off -compose copy_opacity -composite sparse-color:-|\ convert -size 50x50 xc: -sp...
by rpatelob
2017-05-11T22:17:33-07:00
Forum: MagickWand
Topic: Help me on MagickColorMatrixImage
Replies: 3
Views: 15685

Re: Help me on MagickColorMatrixImage

Thanks a lot @el_supremo, you saved my a lot of time. Your solution works perfectly.
Just one quick question. How do I know that I need to pass the matrix in just as a String. I mean I couldn't found any documentation regarding it.
Could you please explain about it a bit?
by rpatelob
2017-05-11T04:14:26-07:00
Forum: MagickWand
Topic: Help me on MagickColorMatrixImage
Replies: 3
Views: 15685

Help me on MagickColorMatrixImage

Anyone please show me one example about MagickColorMatrixImage method in C. I'm using Version: ImageMagick 7.0.5-5 Q16 x86_64 Method definition https://www.imagemagick.org/api/magick-image.php#MagickColorMatrixImage . MagickBooleanType MagickColorMatrixImage(MagickWand *wand, const KernelInfo *color...
by rpatelob
2017-05-10T21:59:13-07:00
Forum: MagickWand
Topic: How to pass parameters in PixelSetHSL
Replies: 3
Views: 14899

Re: How to pass parameters in PixelSetHSL

The arguments to PixelSetHSL are double floating point fractions of QuantumRange. PixelSetHSL(PW2, (double)120/QuantumRange, 50/100.0, 50/100.); 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 ...
by rpatelob
2017-05-10T02:30:52-07:00
Forum: MagickWand
Topic: How to pass parameters in PixelSetHSL
Replies: 3
Views: 14899

How to pass parameters in PixelSetHSL

I have this CLI convert 'xc:hsl(120,50%,50%)' test.jpg 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? MagickWand * wand2; PixelWand * PW2; PW2 = NewPixelWand();...