Artifacts around logo when used imagick compositeimage

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
trangtv04110
Posts: 7
Joined: 2014-03-30T20:57:37-07:00
Authentication code: 6789

Artifacts around logo when used imagick compositeimage

Post by trangtv04110 »

Line code: $top->compositeImage($logo, Imagick::COMPOSITE_OVER, $left_padding, $top_padding);

When I used composite method, it appear strange things around source image
Please see links:
http://screencast.com/t/8aBR7d9J
http://screencast.com/t/SmfaGfN3B

Help me !!!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Artifacts around logo when used imagick compositeimage

Post by fmw42 »

What version of Imagemagick and what version of Imagick are you using? Can you provide links to your two input images? You can upload them to dropbox.com (public folder) and put links here. What are your exact argument values? What are your input and output format? If jpeg, then you could be seeing compression artifacts?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Artifacts around logo when used imagick compositeimage

Post by snibgo »

The white arrows are pointing to jpeg artifacts. Solution: don't use jpeg for images that have areas of flat colour.
snibgo's IM pages: im.snibgo.com
trangtv04110
Posts: 7
Joined: 2014-03-30T20:57:37-07:00
Authentication code: 6789

Re: Artifacts around logo when used imagick compositeimage

Post by trangtv04110 »

Thanks for your help.
I think it is because jpeg. If I used png, it not happens.
But I want to use jpeg, not png. Is there a solution here?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Artifacts around logo when used imagick compositeimage

Post by snibgo »

"-quality 100" may reduce the problem.

Why do you want to use jpeg? It isn't designed for this type of image. A PNG is probably smaller than jpeg quality 100.
snibgo's IM pages: im.snibgo.com
Post Reply