At 13:45 07/09/2006, you wrote:
Hi,
when I stretch a PNG file (256 colours) to fit a smaller window the
new image quality is extremely poor. Am I doing something wrong here
? In Lazarus I use a TImage component and set the Stretch property
to true. Maybe there is another way to make an image fit the
constraints of the component ? If I resize the image with XnView and
the load it it works, but that defeats the purpose of being able to
browse images on the fly.
The Stretch algorithm used in TImage is a easy implementation and has
this problems. If you don't want to add your own Resize method, you
can try to Stretch in 2 or more steps, so if you have an image
720x576 and you want to have a 180x100 you can strecht first (on
invisible TImage component) to 360x288, then to a visible 180x100.
The more steps, better quality, and it's fast.
HTH
------------------------------------------------------------
Alien.org contacted... waiting for Ripley
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives