?
Solved

PHP Jquery Image upload and crop

Posted on 2011-09-29
13
Medium Priority
?
777 Views
Last Modified: 2012-05-12
Hi Experts,

I am farily new to PHP and jquery so as much detailed help as possible would be greatly appreciated

I need to do the following:

1. Upload an image
2. Crop it to become equal width and length (i.e. Square)
3. Resize it to say 300 x 300 pixels
4. Rename it and save it to a folder

Please someone patch a script together to help!!!

MANY THANKS IN ADVANCE
0
Comment
Question by:maccaj51
[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
  • 6
  • 6
13 Comments
 
LVL 13

Expert Comment

by:haloexpertsexchange
ID: 36815627
what kind of images to you need to work with?
0
 

Author Comment

by:maccaj51
ID: 36815652
jpg, gif or png would be great!
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 13

Expert Comment

by:haloexpertsexchange
ID: 36815689
you can use the gd library in php to do this.
look in your php_info and see if you have it installed already, most newer version of php do, and it should also tell you what version of it you have.

http://php.net/manual/en/book.image.php
This the manual for it.
Give me a few minutes and I will get something together.
0
 
LVL 13

Expert Comment

by:haloexpertsexchange
ID: 36815700
imagemagick is nice but it can be a pain to install and use.
0
 

Author Comment

by:maccaj51
ID: 36815706
I do indeed have it installed... Halo your a legend!
0
 
LVL 13

Expert Comment

by:haloexpertsexchange
ID: 36815867
I can arbitrarily crop the image, any size that you want it cropped to, say if the height is larger crop to width or the other way around?
0
 

Author Comment

by:maccaj51
ID: 36815880
It would be nice for the user to crop it... i.e. Jcrop or something like that...

I am making a basic CMS... the images on the site need to be square but i dont trust the users photoshop skills - hence being able to crop online...

Does this make sense?
0
 

Author Comment

by:maccaj51
ID: 36815882
Basically so they can choose the focus of the image aswell...
0
 
LVL 13

Expert Comment

by:haloexpertsexchange
ID: 36815901
so would the locations be passed in with the image so that you don't have to worry about calculating an sort of best location and size.
If that is so this gets easier to do.
I will assume that the locations that are being cropped will be passed in.
0
 
LVL 13

Accepted Solution

by:
haloexpertsexchange earned 1500 total points
ID: 36815940
looks cool, much faster than having to write stuff up by hand and should have most of the bugs fixed already.
0
 

Author Closing Comment

by:maccaj51
ID: 36930061
Thanks for your help!
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
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 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 …
Suggested Courses

762 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