Monday, January 22nd, 2007

Open source PHP-based Ajax image editor

Category: PHP, Showcase

Pete Frueh has released a PHP-based Ajax image editor under the LGPL.

The editor is both front and back end code, and is yet another tool to play with images.

You can check out a demo to see it in action.

Download the code and take a peak through.

Image Editor

Posted by Dion Almaer at 9:08 am
22 Comments

+++--
3.8 rating from 10 votes

22 Comments »

Comments feed TrackBack URI

Very nice. Seems to have a few flukes right now (if I crop, then rotate, sometimes it rotates the original rather than the cropped photo; save as active seems to take me back to an older version), but is very useful, and it’s nice to see someone giving away this code instead of just hosting it for profit.

Would be nice to see some details on crop area (coords, size) before actually clicking the button, but that’s an easy mod.

Good job, Pete. Keep it up!

Comment by Keith — January 22, 2007

Keith: Thanks for the kind words. The current version was designed to be a single-user tool for content management system administrators — hence its quirky behavior as almost 1000 Ajax freaks slammed two JPEG images on my site yesterday! I would recommend to anyone interested in getting consistent results that they download the source code and drop it on *their* server. Cheers.

Comment by Pete Frueh — January 23, 2007

Nice Script! ;o) I have tried to port it to mootools. Its nearly ready, but has bugs at this time. If someone hast the time… here you can find the mootools version:

dev.visualdrugs.net/mootools/ImageEditor/ImageEditor.rar

The class PageInfo is not needed any more.

have fun, ciao André

Comment by André Fiedler — January 23, 2007

Hi,
Now it works with mootools.

Demo: http://www.andrefiedler.de/dev/ImageEditor/?imageName=frog.jpg
Source: http://www.andrefiedler.de/dev/ImageEditor/ImageEditor.rar

have fun. :)

ciao SunboX

Comment by André Fiedler — January 27, 2007

Andre, you’re the man. Nice work.

Comment by Pete Frueh — January 27, 2007

Cool, can someone please update the croping with this widgit?
http://www.dhtmlgoodies.com/scripts/image-crop/image-crop.html
http://www.dhtmlgoodies.com/index.html?page=ajax

Comment by Patrick — February 6, 2007

this is awesome. i’m looking to implement this into a web-based tool i want to write. I’m going to have it search for an image with something like yahoo image search (google doesn’t have an image api) and then do some minor editing on the image you want to use to crop it to size. neat!

Comment by jason — February 6, 2007

I just completed a ColdFusion version using Rick Root’s open source ImageCFC. You can download it here: http://www.ajaxprogrammer.com/examples/ImageEditor_CF.zip

Comment by Pete Frueh — February 9, 2007

First of all I want to congratulate you on this cool software. Well done.
I’ve been looking for something like this for sometime.

I am trying to use this for a project and I notice the resizing limitation. How can I resize pictures which are for instance 2272 x 1704. I tried chaning the validDimension to 2272 but the constraint feature doesn’t work properly after that.

I also tried changing line 190 if (w > 2000 || h > 2000){

Any suggestions?

Thanks once again

Comment by JaSON — February 27, 2007

It turns out it was cacheing I saved it and it works.

Thanks a load. You’re the man!!

Comment by JaSON — February 27, 2007

Hi i’m trying out the mootols version, its super,…but…..I cant seem to get it to work when the folders, active, edit and original are outside the main install folder..

i have tried /var/www/vhosts/ etc. and htpp://www.site.co.uk//…. and just a relative ../..original but no joy.

Comment by Matt — March 30, 2007

There’s a slight bug on some Window’s servers running Apache and PHP5. Under index.php you need to change

to

which should work across all platforms and both PHP4 and PHP5.

Comment by Nick Kilian — June 7, 2007

\\

\\

Comment by Nick Kilian — June 7, 2007

Ah well, that doesn’t work. You just need to change the MyImageEditor = new ImageEditor in index.php to reflect correct PHP syntax.

Comment by Nick Kilian — June 7, 2007

This images editors are realy nice but except for the dhtml one I can’t find the way to save the images with the ajax scripts ???

Comment by Rubenxela — October 22, 2007

I’m currently developing JPIE (JavaScript and PHP Image Editor). You can try it at http://www.jpie.net.

It uses AJAX. It’s an alpha version, but it works, and it’s easy to develope new plug-ins.

Bye!!!!

Alfonso

Comment by jalfpa — February 25, 2008

Try this: http://akoie.akanai.eu/
Its the Akoie (AKanai Online Image Editor). It uses HTML, JavaScript and Ext JS on client side and ImageMagick and PHP on server side. And its Open Source!

Julian

Comment by julianstricker — August 25, 2008

i am trying to use http://www.andrefiedler.de/dev/ImageEditor/ImageEditor.rar but my image is not shown. can anyone help me? this is the link where i m using it http://www.natuurlijkdieet.nl/CMS_Application/imageManager/imageEditor/index.php?imageName=frog.jpg

Comment by 123456789abc — November 1, 2008

Have a look at this: http://www.ajax-image-editor.com/demo/
Its Open-Source, too.

Comment by julianstricker — December 11, 2008

is any way to insert text at given position into image using this editor ?
if not , is any way to do this ?

Comment by prai — June 19, 2009

Hi first of all it is very nice. I wanted the same thing need to work with the image stream fetched from the database table and after cropping, it should go to the database table.
Is it possible with the same code?

Thanks

Comment by budivenkat — June 21, 2009

I created my own version using jquery and php to crop images.
http://keithics.com/blog/jquery/ajaxcrop-jquery-and-php-crop-tool

Comment by keithics — December 28, 2009

Leave a comment

You must be logged in to post a comment.