Solved

Image Resizing without image quality loss

Posted on 2004-03-22
3
1,372 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Creating 2 files from output with Powershell 5 62
Awk : two files math 8 28
Convert .csv to tab delimited text 11 50
troubleshoot a python script 8 74
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 tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

749 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