After some good feedback from our Flash Photo Cropping tool and a few requests for access to our older Java tool, we've finally put together an updated version of the crop code that includes the Java applet code.
I’ve set up another live demo of the Java version, and the source code (zip file) is also available. (contains both Flash and Java versions)
Comments
Will - October 30, 2003 1:32 AM
Neat.
TheChillPill - October 30, 2003 5:29 AM
Very neat indeed! Thanks Guys, keep up the excellent work :-)
Nick Burka - November 1, 2003 9:05 PM
A few people were having trouble loading the Java applet with one version of the Java-plugin. It seems it deals pecularily with the CODEBASE attribute. I've fixed things, so hopefully it will work for everyone now.
Gregory Humber - June 29, 2004 1:34 PM
Excellent work guys :)
Byron - August 22, 2004 9:58 PM
Any chance of getting the .java files???
Byron
Brandon - September 5, 2004 5:47 AM
Small suggestion: the temp file that is created should be cleaned up after the crop. I added the following lines to the end of the process() function:
<pre>
if (isset($this->tmpfilename)) $filename=$this->tmpfilename;
else $filename='tmpimage'.$this->uniqueID.'.jpg';
unlink($this->tmpdir.$filename);
</pre>
Daniel D. - September 13, 2004 5:13 AM
Very nice blog ! Keep up with the good work !
Steven Alyari - September 28, 2004 7:41 AM
Without releasing the .java files; it seems that you are not fully releasing the source code.
Can you possibly release that; I would be interested in improving it.
Thank you,
Steven Alyari
Nick Burka - September 28, 2004 12:51 PM
Steven Alyari - I somehow completely forgot to put the .java file in there. The Java source code file is now included in the zip file.
Steven Alyari - September 28, 2004 11:15 PM
thank you!
you guys rule.
dacloo - September 29, 2004 2:05 PM
Hmmmm, I made some changes so that in the page before cropping you can browse for a file on your harddisk, and then press "crop 'n up".
Offline (using http://localhost with my webserver) this works.
e.g c:\myPhoto.jpg is passed onto the script in $FILES_["name"];
but online it doesn't work. The class says: "Image not found".
What is exactly happening in the "process=0" step? Is it already being uploaded, or?
Do I need to copy the JPG from the harddrive, to the crop utility directory and use THAT file?
Patrick Schwarz - December 22, 2004 6:34 PM
I would suggest using the BufferedImage instead of the Image. That way you can do things like adjust brightness, negative, and stuff like that.
Peter Westerlund - March 14, 2005 4:44 AM
It doesn't work for me I get this message all the time, and I promise I haven't changed anything:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 7040 bytes) in /free1go/i/f/www.ifktaby9192.1go.dk/page_crop/classes/CropImage.php on line 232
H. White - June 23, 2005 2:00 PM
Great tool. Simple question once $process==1 is there a simple way to get the cropping demensions (starting x, starting y, ending x, ending y, etc.)that were used? Are the values in some variable or array? Note using the flash version.
We will crop a fullsize picture in another process and need the cropping demensions used.
Thanks
Virgohippy - January 25, 2007 11:10 PM
H. White
The dimensions are passed as post values. You can access them as x1,y1,x2,y2 like any other posted value.
Took me a few minutes to figure that one out. ;)
Hope this helps. =)
Harry Wood - November 2, 2007 1:27 PM
When I follow the 'live demo' link here, I'm seeing 9 broken images. And 'Image Not Found' message when I click on them. It could be the dodgey corporate firewall I'm stuck behind I suppose.
Mike Gauthier - November 26, 2007 3:11 PM
Harry,
The demo is fixed now, thanks for your report.