Re: how to keep png transparency while resizing
Posted: 2007-07-13T23:56:48-07:00
Just about any form of resize is going to 'dim' thin lines.
It is a problem due to thin lines being swamped by the surrounding colors. Or as the image gets smaller, the line gets thinner, and 'disappears'.
There has been little in the way of reported solutions, except to use some techniques to thicken a line.
For example see a rough note I made in
http://www.imagemagick.org/Usage/compose/#darken
assuming your lines are black you can 'jitter' the image around a little and compose the jittered images together with a 'darken' composition method. That will select the darker value of each color channel.
NOTE: Darken may have some problem if the darkening is done on a 'per channel' basis, (as per Photoshop), but I have not verified if that is the case for IM. If this is a problem, some yet to be developed methods of properly darkening, such as only darkening the 'luminence' channel of an image in HSL colorspace.
If this is not what you are talking about some examples of your problem may be in order.
It is a problem due to thin lines being swamped by the surrounding colors. Or as the image gets smaller, the line gets thinner, and 'disappears'.
There has been little in the way of reported solutions, except to use some techniques to thicken a line.
For example see a rough note I made in
http://www.imagemagick.org/Usage/compose/#darken
assuming your lines are black you can 'jitter' the image around a little and compose the jittered images together with a 'darken' composition method. That will select the darker value of each color channel.
NOTE: Darken may have some problem if the darkening is done on a 'per channel' basis, (as per Photoshop), but I have not verified if that is the case for IM. If this is a problem, some yet to be developed methods of properly darkening, such as only darkening the 'luminence' channel of an image in HSL colorspace.
If this is not what you are talking about some examples of your problem may be in order.