Solved

image convert

Posted on 2006-11-15
4
296 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
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
designing in object programming 12 79
php construct 5 27
PHP Sessions in WordPress 8 32
google analytics on wp-admin password protected area 2 24
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

823 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