|
Re: GC.drawImage to shrink does not look good on Windows [message #467345 is a reply to message #467342] |
Sun, 29 January 2006 17:40 |
Alex Blewitt Messages: 946 Registered: July 2009 |
Senior Member |
|
|
What you're describing sounds like anti-aliasing (or lack thereof). I don't know if Windows does anti-aliasing by default when changing image sizes; by the sounds of things, your graphics card isn't doing that.
I suspect the only way around this would be to perform the image shrinking yourself (by implementing your own anti-aliasing mechanism), and then draw it with a 1-1 image size via the Windows API.
The image resizing is a function of the graphics card and driver on your Windows system, so a different graphics card (or different driver settings) may have an effect. 3D graphics cards, for example, often have various anti-aliasing effects which affect how they perform.
If you want to use different sizes, then it might be worth preparing different image sizes in advance; for example, there's a bunch of 32x32 and 16x16 icons that are used at different sizes instead of doing on-the-fly conversion. Also, dropping size by exactly 1/2 sometimes has benefits (since it can use a different anti-aliasing mechanism).
Have a look at the images in Internet Explorer, with a simple IMG="src.gif" width="32" height="32" type tag, and then change it to a different size (e.g. width="30" height="30"). You'll almost certainly see the same pixelation that you see with Eclipse. However, on other operating systems (Mac,Linux etc.) you will probably see a better anti-aliasing of the image in question (and maybe even for Firefox too, since it probably implements its own routine).
For more information, search wikipedia for anti-aliasing if you want to knnow more.
Alex.
|
|
|
Re: GC.drawImage to shrink does not look good on Windows [message #467349 is a reply to message #467345] |
Mon, 30 January 2006 00:50 |
Barry Andrews Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Thanks Alex! I fixed the problem with setAntialias() and
setTextAntialias()
Still doesn't look quite as good as it does on Linux but it's a huge
improvement.
-Barry
Alex Blewitt wrote:
> What you're describing sounds like anti-aliasing (or lack thereof). I don't know if Windows does anti-aliasing by default when changing image sizes; by the sounds of things, your graphics card isn't doing that.
>
> I suspect the only way around this would be to perform the image shrinking yourself (by implementing your own anti-aliasing mechanism), and then draw it with a 1-1 image size via the Windows API.
>
> The image resizing is a function of the graphics card and driver on your Windows system, so a different graphics card (or different driver settings) may have an effect. 3D graphics cards, for example, often have various anti-aliasing effects which affect how they perform.
>
> If you want to use different sizes, then it might be worth preparing different image sizes in advance; for example, there's a bunch of 32x32 and 16x16 icons that are used at different sizes instead of doing on-the-fly conversion. Also, dropping size by exactly 1/2 sometimes has benefits (since it can use a different anti-aliasing mechanism).
>
> Have a look at the images in Internet Explorer, with a simple IMG="src.gif" width="32" height="32" type tag, and then change it to a different size (e.g. width="30" height="30"). You'll almost certainly see the same pixelation that you see with Eclipse. However, on other operating systems (Mac,Linux etc.) you will probably see a better anti-aliasing of the image in question (and maybe even for Firefox too, since it probably implements its own routine).
>
> For more information, search wikipedia for anti-aliasing if you want to knnow more.
>
> Alex.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04067 seconds