Search found 62 matches

by rpatelob
2017-05-09T07:18:20-07:00
Forum: MagickWand
Topic: Equivalent of -colors 2.
Replies: 12
Views: 24176

Re: Equivalent of -colors 2.

Thanks @snibgo. "MagickQuantizeImage" looks similar. I'll try that.
by rpatelob
2017-05-09T04:14:12-07:00
Forum: MagickWand
Topic: Equivalent of -colors 2.
Replies: 12
Views: 24176

Equivalent of -colors 2.

I'm using ImageMagick 7.0.5-5 Q16 x86_64 convert -size 20x640 gradient: -rotate 90 -colors 2 -colorspace gray -auto-level test.jpg C code MagickWand * m_wand; PixelWand *PW1, **pixels; m_wand = NewMagickWand(); PW1 = NewPixelWand(); PixelSetColor(PW1,"none"); MagickNewImage(m_wand, 20, 640, PW1); Ma...
by rpatelob
2017-05-05T06:24:59-07:00
Forum: MagickWand
Topic: Where is respect-parenthesis ?
Replies: 2
Views: 14725

Re: Where is respect-parenthesis ?

When writing MagickWand C, you do operations to whatever image(s) you want. There is no equivalent to parentheses "(" and ")", therefore no equivalent to "-respect-parentheses". Oh Thank you and sorry to asked such a foolish question, Actually I didn't understand the meaning of the command. Thanks ...
by rpatelob
2017-05-05T03:30:45-07:00
Forum: MagickWand
Topic: Where is respect-parenthesis ?
Replies: 2
Views: 14725

Where is respect-parenthesis ?

In ImageMagick 7.0.5-5 Q16 x86_64

Code: Select all

convert -respect-parentheses 
I'm looking for a similar option in MagickWand C. Is there any alternate option for it?
by rpatelob
2017-05-05T03:23:53-07:00
Forum: MagickWand
Topic: Morphology in MagickWand.
Replies: 6
Views: 22727

Re: Morphology in MagickWand.

Hello el_supremo, Finally I got my solution this way. -morphology Distance:-1 Euclidean:5,1000 KernelInfo *kernel; GeometryInfo geometry; geometry.sigma = 1000; geometry.rho = 5; ExceptionInfo * exc = AcquireExceptionInfo(); kernel = AcquireKernelBuiltIn(EuclideanKernel, &geometry, exc); MagickMorph...
by rpatelob
2017-05-01T21:19:03-07:00
Forum: MagickWand
Topic: Morphology in MagickWand.
Replies: 6
Views: 22727

Re: Morphology in MagickWand.

Thank you snibgo for the suggestion. And I'm using Version: ImageMagick 7.0.5-5 Q16 x86_64 2017-04-26 http://www.imagemagick.org.
by rpatelob
2017-05-01T05:11:51-07:00
Forum: MagickWand
Topic: Morphology in MagickWand.
Replies: 6
Views: 22727

Morphology in MagickWand.

What is the equivalent of below CLI into C? -morphology Distance:-1 Euclidean:5,1000 C code. KernelInfo *kernel; const char *kernel_string = "EuclideanKernel"; ExceptionInfo * exc = AcquireExceptionInfo(); kernel = AcquireKernelInfo(kernel_string,exc); MagickMorphologyImage(wand2, DistanceMorphology...
by rpatelob
2017-04-28T07:40:28-07:00
Forum: MagickWand
Topic: Where is CopyOpacityCompositeOp composite operator?
Replies: 3
Views: 16692

Re: Where is CopyOpacityCompositeOp composite operator?

snibgo wrote:
2017-04-28T07:29:44-07:00
"CompositeOperator" is defined in composite.h

In v6, that enum is called "CopyOpacityCompositeOp".

In v7, it is called "CopyAlphaCompositeOp".
Thank you snibgo, I did not know that they both are same. :D
by rpatelob
2017-04-28T06:45:43-07:00
Forum: MagickWand
Topic: Where is CopyOpacityCompositeOp composite operator?
Replies: 3
Views: 16692

Where is CopyOpacityCompositeOp composite operator?

I have been using ImageMagick 7.0.5-5 Q16 x86_64 2017-04-26 http://www.imagemagick.org . I think in previous version there is a CopyOpacityCompositeOp CompositeOperator present. But now in the latest version it's not there. check out this link. https://www.imagemagick.org/api/MagickCore/composite_8h...
by rpatelob
2017-04-28T03:01:44-07:00
Forum: MagickWand
Topic: Problem in resize image percentage wise.
Replies: 3
Views: 16653

Re: Problem in resize image percentage wise.

A resize followed by a scale won't give the same result as a single resize. You want "-resize 294.105%". This would be: size_t newWidth = floor(294.105*width/100.0 + 0.5); size_t newHeight = floor(294.105*height/100.0 + 0.5); MagickResizeImage(wand, newWidth, newHeight, 0); I have done the same thi...
by rpatelob
2017-04-27T02:20:17-07:00
Forum: MagickWand
Topic: Problem in resize image percentage wise.
Replies: 3
Views: 16653

Re: Problem in resize image percentage wise.

I got the solution. I just need to call MagickScaleImage(wand, width, height); function exactly after MagickResizeImage(wand, newWidth, newHeight, 0); function.
by rpatelob
2017-04-27T00:58:01-07:00
Forum: MagickWand
Topic: Problem in resize image percentage wise.
Replies: 3
Views: 16653

Problem in resize image percentage wise.

convert yahoo.jpg -resize 294.105% -background none -extent 1941.09x5663.99 yahootest.png I have this command. Now in that command the resize parameter is in percentage so I tried to write same thing using C and below is my code. The problem with C code is when MagickExtendImage executed the image ...
by rpatelob
2017-04-25T05:47:42-07:00
Forum: Users
Topic: Anyone please explain me below command.
Replies: 12
Views: 8139

Re: Anyone please explain me below command.

Got the sollution. I just need to merge two.png and three.png images together and apply displace composite with one.png. below is the alternative command for this. Finally I converted it to C and it worked. convert two.png three.png +clone -combine displaceMask.png convert one.png displaceMask.png -...
by rpatelob
2017-04-25T02:42:16-07:00
Forum: MagickWand
Topic: MagickWand C API equivalent to below command.
Replies: 6
Views: 21186

Re: MagickWand C API equivalent to below command.

convert cnbc_r.jpg \ '(' cnbc_i.jpg +transparent '#0A0B0D' -alpha extract ')'\ '(' cnbc_p.jpg -rotate -33.75 +repage -gravity center -crop 600x437+0+0 +repage ')'\ '(' -clone 0 -clone 2 -compose softlight -composite ')'\ -delete 0,2 +swap -compose over -alpha off -compose copy_opacity -composite\ '...
by rpatelob
2017-04-24T23:54:00-07:00
Forum: MagickWand
Topic: MagickWand C API equivalent to below command.
Replies: 6
Views: 21186

Re: MagickWand C API equivalent to below command.

If you output the command line result to a PNG, it has a transparent background. Even so, it seems to be a very complicated command which seems to just invert the black and white in cnbc_i.jpg, make the black transparent and replace the white area with the pattern in cnbc_p.jpg. Is it supposed to d...