Solved

image convert

Posted on 2006-11-15
4
279 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
Comment Utility
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:ingwa
ingwa earned 75 total points
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

771 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

9 Experts available now in Live!

Get 1:1 Help Now