If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
![]() |
|
|
#1 |
|
Naughty Boy!
Join Date: Jan 2002
Posts: 3,266
|
I had asked an identical question about this quite a while back and forgotten what the answer(s) was (I remember Simon and Colourless commented but can't remember what they actually said).
Let's say I have a 1024x768 image to display in a web browser (we'll take IE as example). However, if I were to specify that the image is to be displayed at a larger or lower resolution, can anyone tell me how a browser resizes the image? Is it straight bicubic resampling or something else? There's a reason for asking : Does anyone think what I have in mind to be particularly useful?
__________________
Reverend Dev Anon : Best game ever? Hmm... you mean other than anything from us? (2005) |
|
|
|
|
|
#2 |
|
Member
Join Date: Feb 2002
Posts: 111
|
Almost certainly the browser does simple subsampling for down scaling and replication for up scaling. That is what IE does on my system anyway and it looks terrible.
edit: Having now tried your test, the up scale looks OK. If I use a lower resolution it doesn't scale down but you maybe didn't expect it to. My original comment was referring to the scaling IE does if you view an image bigger than your display. In some cases the browser scales it down to fit but it always does it badly. |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Feb 2002
Posts: 2,019
|
My laptop has a 1024x768 resolution so it didn't need to scale the image. I use Mozilla and I'm not sure what scaling algorithm it uses, but it doesn't seem to be the highest quality. Although the only scaling I've seen is scaling down to fit in the window, not up.
This suggestion is more work for you, but avoids the scaling issues on the reader's end. Why not store multiple resolutions on the server end and use JavaScript to load the proper image? Since the author scales, or creates natively, these multiple resolutions he can check the quality. My past tests have shown that a Sinc filter does a good job upscaling. Slightly better than bicubic because to my eyes the resulting image sometimes looks a little crisper. |
|
|
|
|
|
#4 | |
|
Naughty Boy!
Join Date: Jan 2002
Posts: 3,266
|
Quote:
So then, the next question would be : a) if I "downsize" the original 1024x768 image to say 800x600 (to fit a 800x600 desktop), what would be the best method/app? Bilinear resampling? b) if I "upsize" the original 1024x768 image to say 1600x1200 (to fit a 1600x1200 desktop), what would be the best method/app? Bicubic resampling?
__________________
Reverend Dev Anon : Best game ever? Hmm... you mean other than anything from us? (2005) |
|
|
|
|
|
|
#5 | |
|
Moderator
Join Date: Feb 2002
Location: Taiwan
Posts: 2,347
|
Quote:
b) The same as a), except bicubic interpolation is much better than bilinear. |
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Feb 2002
Posts: 2,019
|
I'm not sure about downscaling, but bicubic, lanczos, and sinc filters are the best I've found for upscaling. I prefer Lanczos/Sinc the best. I can't tell the difference between them. Bicubic is probably good enough though and you can use Photoshop for scaling in that case.
Here is a good imaging program to test on some images. There is a command line tool that can scale images. http://www.imagemagick.org/ |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|