Feature request: Full-size image cropping

beaverweasil

Joined: 2003-09-11
Posts: 29
Posted: Thu, 2003-09-11 19:16

The subject says it all: it would be supreme if you could crop and save your full-sized images, just like you do with the thumbnails. I've been hacking around with edit_thumb.php and others, and it seems like it could be done... by someone! but not me. :cry:

 
BorgKing
BorgKing's picture

Joined: 2002-09-12
Posts: 314
Posted: Fri, 2003-09-12 01:09

weasil, you realise they invented software for this? Adobe Photoshop, Adobe Elements, Paint Shop Pro to name a few good ones.
This is not something that hasn't been created yet, and I doubt if it ever will, unless you give it a try yourself.

But really, Gallery is software to view photos, photo management at most, you're looking for photo manipulation software.

 
beaverweasil

Joined: 2003-09-11
Posts: 29
Posted: Fri, 2003-09-12 11:16

Man, I ask a simple question... Yes, I am aware of image editing software, BongKing. I still think it would be a useful feature for people who can't afford Photoshop, etc. Not looking for a full editing suite, just image cropping.

Sorry I asked. Thanks for nothing.

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Fri, 2003-09-12 11:30

We'll look into it as a possibility.

We already have the ImageTools java applet to crop the thumbs... so it wouldn't be too much of a stretch...

beaverweasil, perhaps you can file an enhancement request:
http://sourceforge.net/tracker/?group_id=7130&atid=357130

-Beckett (

)

 
Gaile

Joined: 2002-07-20
Posts: 1301
Posted: Fri, 2003-09-12 17:55

hey beaverweasil

I hope you didn't take my closing your other thread the wrong way, it's just that I noticed the same question had been asked in two places and already answered in one.

In the meantime, until there is a cropping method available in Gallery for larger images - here's a link for you and anyone else looking for a simple cropping tool that you can use on your files before uploading to Gallery.

It's Freeware and allows noise filtering, photo rotation and cropping. I haven't looked at it much, downloaded it awhile back to try for someone else's needs and found it easy to understand and quite useful for a quick cropping tool.

Read more and download here: InstaCropper.

Gaile

 
beaverweasil

Joined: 2003-09-11
Posts: 29
Posted: Tue, 2003-09-23 12:38

Thanks for the replies. Is the java applet coded specifically to the thumbnails, or can it accept parameters for full-sized images? Is there an non-compiled version available for hacking? It seems like this would not be that hard to work out (but what do I know!)

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Thu, 2003-09-25 07:20

Sure... it should be trivial to apply this to the full-size image. My guess is it'll work pretty much as is.

If you want to look at the code though, you can browse the CVS.

-Beckett (

)

 
beaverweasil

Joined: 2003-09-11
Posts: 29
Posted: Thu, 2003-09-25 11:25

Thanks... looked through the java; didn't see anything specific to thumbnails... which .php files/functions would be involved? besides hacking edit_thumb.php...

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Fri, 2003-09-26 04:06

I suppose just dupe the edit_thumbnail.php file, then make sure to pass the *full sized* image to the app rather than the thumb. Hopefully you won't need to store any new image data, but I took a quick look and I don't think it'll be necessary.

Ask if you have specific questions. :)

-Beckett (

)

 
VLPublishing

Joined: 2003-09-28
Posts: 4
Posted: Mon, 2003-09-29 00:08

Hi there, have you tried using a wonderful little piece of software (which is freeware for personal use) Irfanview developed by Irfan Skilijan. I just open up any pic click and drag my mouse over the pic I want to crop. Picture is selected - you see the box. Select Edit Crop-Selection and sweet as. You can also go into Image Resize - Resample and change the doc size manually or via Preserve Aspect Ratio

Not sure if I was allowed to post the link here

Victoria
VLPublishing

 
beaverweasil

Joined: 2003-09-11
Posts: 29
Posted: Mon, 2003-09-29 19:11

Thanks Beckett. Being not-so-hip to classes in php, I'm wondering if I need to add some properties to the image class to be able to accomplish this. For example in edit_thumb.php, it says

$photo->image->setThumbRectangle($crop_x, $crop_y, $crop_w, $crop_h);

will I need to make a new method here? or just feed it different data?

BTW, I want to be able to do this so that multiple users will be able to crop images, not just me--that's why I'm not looking for a "desktop" cropping solution.

 
beaverweasil

Joined: 2003-09-11
Posts: 29
Posted: Tue, 2003-09-30 12:31

OK, I've gotten it to work... sort of, by changing some instances of "thumb_size" to "resize_size" and by commenting out some lines in "edit_thumb.php", like so:

//if ($photo->image->resizedName) {
			//$photoURL .= $photo->image->resizedName . "." . $photo->image->type;
		//} else {
			$photoURL .= $photo->image->name . "." . $photo->image->type;
		//}

It now crops a chunk of the full size image, but it is still saving it as the thumbnail... I think all I need to do is to have it not append the ".thumb" to the file name when saving, but I can't find where that is being added... any thoughts?