Solved

Image Resizing without image quality loss

Posted on 2004-03-22
3
1,367 Views
Last Modified: 2013-12-25
One of my clients is currently using LWP:UserAgent to fetch HTML from another site.  He's having a problem because the image is too large for his site.  When we change the HTML to reduce the size of the image the quality stinks.  Is there a way to do this.  Maybe with an external script that would fetch the image and automatically reduce it?  I guess an example would be like:

<img src=http://www.domain.com/reducer.cgi?image=http://www.otherdomain.com/image.gif>
0
Comment
Question by:acdesigns
3 Comments
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
wget -O - http://www.otherdomain.com/image.gif | gifresize
0
 
LVL 48

Accepted Solution

by:
Tintin earned 250 total points
Comment Utility
If you have ImageMagik installed, you can do the whole lot in Perl (if you want to).

However, I am curious that you save you change the HTML to reduce the size of the image and the "quality stinks".   By that I'm assuming you are adjusting the height and width values in the <img src..> tag?  If so, if you are reducing the size, there should be no loss of quality so long as you retain the same aspect ratio.
0
 
LVL 3

Expert Comment

by:rkosai
Comment Utility
The image should not lose quality as long as the aspect ratio as maintained, as Tintin stated.

This means that if you have a 800x600 picture, then you could resize it to an 8x6 picture, or a 160x120 picture, or anything where the width/height ratio is the same.  But you couldn't resize it to something like 8x7 or 160x150 without making the graphic look bad.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now