Composite "fuzzy"

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
kfeina
Posts: 17
Joined: 2013-02-12T13:09:49-07:00
Authentication code: 6789

Composite "fuzzy"

Post by kfeina »

Hello;

I'm doing a composite between two images:

- The "first" image contains text in different colors.
- The second image is a background wallpaper.
- The composited image is not clear. The "red text is fuzzy, not clear". Other text colors like black, white, are perfect ....

Is it possible to have a clear result, maintaining the original text colors, without getting "fuzzy text" images?

Thanks a lot.

My command is:
"/BGBINARIES/ImageMagick/composite" -gravity SouthEast -geometry +0+50 "/tmp/BGINFO4X/k/bginfo4x.png" "/tmp/BGINFO4X/k/GNOME-Happygnome_1280x1024.jpg.original" "/tmp/BGINFO4X/k\BG_k_GNOME-Happygnome_1280x1024.jpg"

The text image is:
Image

The resulting composited image is here:
http://i.imgur.com/cJnvmhi.jpg
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Composite "fuzzy"

Post by snibgo »

What version of IM are you using? On what platform? Please supply "GNOME-Happygnome_1280x1024.jpg.original".

Replicating your command on recent IM gives a different, cleaner result. (EDIT: when written to PNG.)
Last edited by snibgo on 2013-10-04T09:31:15-07:00, edited 1 time in total.
snibgo's IM pages: im.snibgo.com
kfeina
Posts: 17
Joined: 2013-02-12T13:09:49-07:00
Authentication code: 6789

Re: Composite "fuzzy"

Post by kfeina »

Hello,

I'm using ImageMagick-6.8.3-10-Q16-x86-windows, portable edition.
After upgrading to the latest version ImageMagick-6.8.7-0 there is no improvement.

To see the original file: GNOME-Happygnome_1280x1024.jpg.original check here:
http://i.imgur.com/trpmfkF.jpg

Any help is welcome.

Thanks a lot.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Composite "fuzzy"

Post by snibgo »

The resulting composited image is here: http://i.imgur.com/cJnvmhi.jpg
That image has black lines. Where did they come from?

The red noise around the red letters is caused by JPG compression. JPG is good for photos but lousy for graphics like this. Solution: don't use JPG. (The PNG equivalent isn't much larger.)
snibgo's IM pages: im.snibgo.com
kfeina
Posts: 17
Joined: 2013-02-12T13:09:49-07:00
Authentication code: 6789

Re: Composite "fuzzy"

Post by kfeina »

Hello again,

The blank lines comes from another composite of 3 png files: shawdow.png + blank.png + red.png.
This file http://i.imgur.com/WRPMgcG.png is the result of this 3 composited files.

If the jpg has compression, why the blank lines aren't fuzzy ? The decrease of quality is not global for all the colors?

Thanks a lot for your time.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Composite "fuzzy"

Post by snibgo »

Roughly speaking, jpeg compression works by removing insignificant detail, but also by adding spurious detail observable as "ringing" in areas of flat colour, which we can see inside and outside the corners of the black rectangle.

If you use lossless compression such as PNG, and blow up the blue areas around any lettering, you will see the PNG version is noticeably smoother than jpeg.
snibgo's IM pages: im.snibgo.com
kfeina
Posts: 17
Joined: 2013-02-12T13:09:49-07:00
Authentication code: 6789

Re: Composite "fuzzy"

Post by kfeina »

Hello,

Yes, you are right, using .png improves the output.
PNG will be now the default file format for those wallpapers.

Thanks a lot for your time. Regards.
Post Reply