Search found 62 matches

by rpatelob
2017-04-24T23:28:00-07:00
Forum: MagickWand
Topic: MagickWand C API equivalent to below command.
Replies: 6
Views: 30545

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...
by rpatelob
2017-04-24T06:48:22-07:00
Forum: MagickWand
Topic: MagickWand C API equivalent to below command.
Replies: 6
Views: 30545

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-23T21:27:27-07:00
Forum: MagickWand
Topic: Tile or montage in MagickWand
Replies: 6
Views: 27078

Re: Tile or montage in MagickWand

Got it working with this code: #include <windows.h> #include <stdio.h> #include <string.h> #include <wand/magick_wand.h> void test_wand(void) { MagickWand *wand, *texture_wand, *output_wand; MagickWandGenesis(); wand = NewMagickWand(); MagickSetSize(wand,1200,874); MagickReadImage(wand,"xc:whi...
by rpatelob
2017-04-21T07:22:26-07:00
Forum: MagickWand
Topic: Tile or montage in MagickWand
Replies: 6
Views: 27078

Re: Tile or montage in MagickWand

Source Image(8x8) https://drive.google.com/file/d/0B-HZjmyodj8jVlZDa0VjSHBjcm8/view?usp=sharing Final Image https://drive.google.com/file/d/0B-HZjmyodj8jZXpJbmhCMWlUUDg/view?usp=sharing Check above two links, I have provided the images. I have a source image of 8x8 and I want the final result like ...
by rpatelob
2017-04-21T05:41:10-07:00
Forum: MagickWand
Topic: Tile or montage in MagickWand
Replies: 6
Views: 27078

Tile or montage in MagickWand

Hello snibgo, could you help me with MagickMontageImage? convert tileC.jpg -write mpr:tile -size 1200x874 tile:mpr:tile tileCmpr.jpg I have this command, it takes 8x8 source image and generate a tile image. For that I wrote below code. But it takes too much time. I get the expected image but code is...
by rpatelob
2017-04-21T04:04:36-07:00
Forum: MagickWand
Topic: append images vertically using MagickWand C API.
Replies: 2
Views: 20025

Re: append images vertically using MagickWand C API.

The source code for MagickAppendImages() is in magick-image.c. The comments tell you how to "stack them top-to-bottom". Thanks a lot snibgo, I haven't noticed the second parameter of that function. MagickAppendImages(wandG,MagickTrue); With this it's working now. I just need to change sec...
by rpatelob
2017-04-21T03:32:22-07:00
Forum: MagickWand
Topic: append images vertically using MagickWand C API.
Replies: 2
Views: 20025

append images vertically using MagickWand C API.

I have multiple images and I need to append them and convert it to one image. For that I wrote below C program, it works fine except it appends images horizontally. How can I append images one after another? For example using convert +append appends images horizontally and convert -append append ver...
by rpatelob
2017-04-20T03:58:54-07:00
Forum: Users
Topic: Anyone please explain me below command.
Replies: 12
Views: 10919

Re: Anyone please explain me below command.

Above, I said that when a composite has three inputs images, the third is a mask. I had forgotten that this is not true for displace or distort composites. For these, the second image is the x-displacement, and the third image is the y-displacement. So there are two (grayscale) distortion maps, not...
by rpatelob
2017-04-20T00:17:22-07:00
Forum: Users
Topic: Anyone please explain me below command.
Replies: 12
Views: 10919

Re: Anyone please explain me below command.

one.png https://i.stack.imgur.com/g4IK6.png two.png https://i.stack.imgur.com/Lj3cs.png three.png https://i.stack.imgur.com/dYHzs.png These are my images. If I simply run convert one.png two.png three.png -compose displace -composite cylinderCMD.png command, I get the similar output image that I wa...
by rpatelob
2017-04-19T06:24:02-07:00
Forum: Users
Topic: Anyone please explain me below command.
Replies: 12
Views: 10919

Re: Anyone please explain me below command.

convert ./one.mpc ./two.mpc ./three.mpc -channel rgba -alpha on -virtual-pixel background -background none -define compose:args=6000x254.91 -compose displace -composite ./one.mpc For above commands I wrote C code like this. MagickSetImageAlphaChannel(wand, RGBChannels); MagickSetImageVirtualPixelMe...
by rpatelob
2017-04-19T06:07:49-07:00
Forum: Users
Topic: Anyone please explain me below command.
Replies: 12
Views: 10919

Re: Anyone please explain me below command.

Yes, because when I ran below command I got the result but with individuals not. convert oneM.png twoM.png threeM.png -compose displace -composite oneC1.png Actually I'm trying to achieve same result with MagickWand C API. But I don't know how to merge three images together with composite. Here is t...
by rpatelob
2017-04-19T05:19:23-07:00
Forum: Users
Topic: Anyone please explain me below command.
Replies: 12
Views: 10919

Re: Anyone please explain me below command.

Yes, that's correct. Do you have a question? yes, Is it equal to these set of commands? convert one.png -channel rgba -alpha on -virtual-pixel background -background none -define compose:args=6000x254.91 oneM.png convert two.png -channel rgba -alpha on -virtual-pixel background -background none -de...
by rpatelob
2017-04-19T04:35:09-07:00
Forum: Users
Topic: Anyone please explain me below command.
Replies: 12
Views: 10919

Anyone please explain me below command.

Code: Select all

 convert ./one.mpc ./two.mpc ./three.mpc -channel rgba -alpha on -virtual-pixel background -background none -define compose:args=6000x254.91 -compose displace -composite ./one.mpc
What I understood is it takes three images and apply all the effects on all three images and finally merge into one.
by rpatelob
2017-04-18T21:54:48-07:00
Forum: Users
Topic: CenterGravity not working.
Replies: 6
Views: 8722

Re: CenterGravity not working.

snibgo wrote: 2017-04-18T11:20:33-07:00 As Bonzo says, you need to calculate the x and y offsets.

To centralise the composite, the x-offset is the difference in the image widths, divided by two. Likewise for the y-offset.
Yes, I did that as an alternate option, as gravity creates a problem. Thank you!
by rpatelob
2017-04-18T04:46:53-07:00
Forum: Users
Topic: CenterGravity not working.
Replies: 6
Views: 8722

Re: CenterGravity not working.

Bonzo wrote: 2017-04-18T02:45:21-07:00 A bit of a pain but could you write some code to calculate the co ordinates for the crop?
Could you please check http://stackoverflow.com/questions/4347 ... ot-working link? There is a source image too