Search found 9 matches

by dxr528
2018-12-05T22:36:52-07:00
Forum: MagickWand
Topic: how to dig a hole of specified size from a JPG image
Replies: 17
Views: 11148

Re: how to dig a hole of specified size from a JPG image

fmw42 wrote:
2018-12-05T20:02:44-07:00
Save the original alpha channel. Then create a mask for you hole. Then multiply the alpha channel and the mask. Then put the result back into the alpha channel of the original image.
Can you help me to make the command with convert? thank you!
by dxr528
2018-12-05T19:00:00-07:00
Forum: MagickWand
Topic: how to dig a hole of specified size from a JPG image
Replies: 17
Views: 11148

Re: how to dig a hole of specified size from a JPG image

snibgo wrote:
2018-11-29T08:29:19-07:00
pngcrush reduces the size by 27%.
Hello, if the original picture is a PNG transparent picture, how can I dig it out and Keep the original transparency?
by dxr528
2018-11-28T21:43:13-07:00
Forum: MagickWand
Topic: how to dig a hole of specified size from a JPG image
Replies: 17
Views: 11148

Re: how to dig a hole of specified size from a JPG image

"-alpha off" deactivates the alpha channel, so CopyOpacity will copy from the intensity, not from the alpha channel. By contrast, setting alpha to opaque activates the alpha channel, setting all pixels opaque, and that's not what you want. // 1 add mask :convert before.jpg -fill black -colorize 30%...
by dxr528
2018-11-28T08:57:00-07:00
Forum: MagickWand
Topic: how to dig a hole of specified size from a JPG image
Replies: 17
Views: 11148

Re: how to dig a hole of specified size from a JPG image

snibgo wrote:
2018-11-28T08:30:51-07:00
Why are they different sizes?
sorry ,i copy the small size img. i have upload the full size img. where is the problem with my code ?
by dxr528
2018-11-28T07:15:30-07:00
Forum: MagickWand
Topic: how to dig a hole of specified size from a JPG image
Replies: 17
Views: 11148

Re: how to dig a hole of specified size from a JPG image

The CLI "-alpha off" operates on all the images in the current list, not just one. When debugging any image processing, it is useful to write image files at the different stages, eg im_clone after each process. Then, when the result is wrong, you can find which part is wrong. i saved im_clone to lo...
by dxr528
2018-11-28T06:26:24-07:00
Forum: MagickWand
Topic: how to dig a hole of specified size from a JPG image
Replies: 17
Views: 11148

Re: how to dig a hole of specified size from a JPG image

How do I implement this with the MagickWand C API? By starting small. Find the C MagickWand functions that correspond to the CLI operations: read, colorize, draw, composite, write. Then write the program. // +clone -fill White -colorize 100 MagickWand *im_clone = NewMagickWand(); im_clone=CloneMagi...
by dxr528
2018-11-27T21:39:03-07:00
Forum: MagickWand
Topic: how to dig a hole of specified size from a JPG image
Replies: 17
Views: 11148

Re: how to dig a hole of specified size from a JPG image

"magick" is a v7 command, but you have v6, so I'm surprised that works at all. In some versions, "-region" didn't work. This longer command does the same job: convert in.jpg ( +clone -fill White -colorize 100 -fill Black -draw "rectangle 20,20,320,430" ) -alpha off -compose CopyOpacity -composite -...
by dxr528
2018-11-27T06:10:19-07:00
Forum: MagickWand
Topic: how to make a glow cover img?
Replies: 2
Views: 3576

how to make a glow cover img?

How do I use MagickWand to generate a mask diagram like the one below?Parameters such as border color, border size, rounded corner size, outer glow color and outer glow area can be customized.
Image
by dxr528
2018-11-27T06:05:54-07:00
Forum: MagickWand
Topic: how to dig a hole of specified size from a JPG image
Replies: 17
Views: 11148

how to dig a hole of specified size from a JPG image

I want to dig a hole of specified size from a JPG image specified location to generate a PNG image. In order to reduce the size of the image, the PNG should be 8 bit. Thank you.The sample diagram is as follows: before: https://s1.ax1x.com/2018/11/27/FVP3Eq.jpg after: https://s1.ax1x.com/2018/11/27/F...