Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

image convert

Posted on 2006-11-15
4
Medium Priority
?
326 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 300 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 300 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

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…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
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…
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…

704 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