Solved

Image Resizing without image quality loss

Posted on 2004-03-22
3
1,369 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
ID: 10656656
wget -O - http://www.otherdomain.com/image.gif | gifresize
0
 
LVL 48

Accepted Solution

by:
Tintin earned 250 total points
ID: 10663088
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
ID: 10663460
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

777 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