-
November 27th, 2007, 05:16 PM
#1
smooth resize image
I am trying to resize an image in html but when I change the size the image gets messed up. Is there a way to resize the image smoothly in html?
-
November 28th, 2007, 02:29 AM
#2
Re: smooth resize image
If by "messed up" you mean it looks pixelated (even when reducing the size), that depends entirely on how the browser decides to render the image. Certain browsers such as Safari resize the image using cubic interpolation (which results in a smooth looking image.)
-
December 3rd, 2007, 05:56 PM
#3
Re: smooth resize image
Here's a sample from the original image:
http://agentsteal.110mb.com/good.jpg
Here's the image after it is resized by a few pixels in IE or FF:
http://agentsteal.110mb.com/resized.jpg
Is there a way to fix this?
--Edit: Paste the URL into the address bar; don't click on the links.
Last edited by agentsteal; December 3rd, 2007 at 05:59 PM.
-
December 4th, 2007, 06:58 AM
#4
Re: smooth resize image
As an answer to your question, I can only quote myself:
Originally Posted by andreasblixt
If by "messed up" you mean it looks pixelated (even when reducing the size), that depends entirely on how the browser decides to render the image. Certain browsers such as Safari resize the image using cubic interpolation (which results in a smooth looking image.)
You cannot affect the way the browser renders an image (although it's possible that loading an image through a filter in Internet Explorer could allow you to use cubic interpolation, but it still won't work in other browsers.)
Make two versions of the image if you need it in two different sizes.
-
December 4th, 2007, 07:51 AM
#5
Re: smooth resize image
Either way, you should always start with a larger resolution image and resize to a smaller resolution. This is the only way to keep the image from pixelating.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|