Solved

image convert

Posted on 2006-11-15
4
321 Views
Last Modified: 2007-01-02
i have a image like pol.jpeg(200x180)
i want this image to pol.jpeg(100x100),
pol.jpeg(100x80),
pol.jpeg(170x120)
 and pol.jpeg(120x120)

is it possible in php?need help  

polash
0
Comment
Question by:polash_ranjan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 75 total points
ID: 17946286
I guess the basic question is: of the 200x180 pixels in the original image, how do you decide which pixels to cut and which to "shrink" to get a 120x120 image?  You can use this function ( http://us3.php.net/manual/en/function.imagecopyresized.php ) to resize an image, but the fact that the sizes you gave use very different proportions means the resulting image (if you just resize it straight from 200x180 to something else) will be stretched funny.  If that's what you're after, it should be trivial to implement.  If not, how does that need to get resolved?
0
 
LVL 18

Assisted Solution

by:Mark Gilbert
Mark Gilbert earned 75 total points
ID: 17947103
Imagemagick is a good alternative to the GD library which enables you to resize/resample/convert images.  The resize option allows you to define a width and height, although it is intellegent enough to maintain aspect ratio.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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.

622 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