Page 1 of 1
Fonts, Aliasing, Transparency 6.2.5 vs 6.2.6
Posted: 2006-03-16T17:06:09-07:00
by dognose
I updated IM to 6.2.6 and noticed a weird problem when drawing text on a transparent background.
Example in 6.2.5:
Example in 6.2.6:
On both of these, I start with a transparent gif, then draw the font on it w/ black as the fill color. These images need to be transparent, as they will be placed on an image in a web browser.
Now, I realize that neither is prefect, but to me, the first is a bit more readable.
Is there a way I can get the same effect as I did in 6.2.5? Or, is there a way I can get even better results?
Posted: 2006-03-16T18:36:01-07:00
by magick
Now try saving to PNG instead. The problem with GIF is there is only one level of transparency and no one algorithm can produce "good" results for all images. You may get improved results by adding -fuzz 50% to your command line. Change the 50 up and down until you get reasonable results.
Posted: 2006-03-16T22:49:34-07:00
by dognose
Well, I'd love use PNG, but IE doesn't seem to support transparency in PNG files, so, I have to use GIF.
in 6.2.5, the -fuzz 50% works great, and it looks much better!
however, in 6.2.6, the fuzz option does nothing.. am I stuck having to use 6.2.5?
here's an update with fuzz in 6.2.5:
Posted: 2006-03-17T08:57:09-07:00
by magick
IE 7.0 Beta 2 supports PNG transparency.
Do help further we need to reproduce the problem. Post a command line or script we can use to produce the results you get and we will try to come up with a reasonable solution.
Posted: 2006-03-17T09:31:39-07:00
by dognose
Code: Select all
convert -fuzz 50% -size 150x60 xc:transparent -font "fonts/AirConditioner.ttf" -pointsize 48 -draw "text 0,50 'Test'" test.gif
Convert was installed from ImageMagick-6.2.6-3.x86_64.rpm
Posted: 2006-03-17T10:29:35-07:00
by magick
We'll need a URL to the Airconditioner.ttf font.
Posted: 2006-03-17T11:25:39-07:00
by dognose
Sorry, this was causing me a problem for all the fonts (some looked much worse than others) I don't have standard fonts installed to test with.
http://www.1001freefonts.com/winfonts/a ... tioner.zip
This one also looked real bad:
http://www.1001freefonts.com/winfonts/ayummyapology.zip
Posted: 2006-03-19T22:18:01-07:00
by anthony
Saving images with transparency (fonts or otherwise) is dealt with in the IM examples at
http://www.cit.gu.edu.au/~anthony/graph ... ats/#trans
Posted: 2006-03-20T10:36:34-07:00
by dognose
ok, thanks, I was able to get similar results now using: -channel A -threshold 50%
Posted: 2006-03-20T22:06:33-07:00
by anthony
The point is you can now adjust how the semi-transparent pixels convert to full transparency, or opacity.
The use of -fuzz in this regard I never accepted as a practical way as fuzz has always been more to do with color comparisions rather than transpaency thresholding. I like to keep them separate.