[prev in list] [next in list] [prev in thread] [next in thread]
List: gallery-devel
Subject: [Gallery-devel] Re: Suggestion: Enhancement for easy rotation
From: James Pace <jepace () pobox ! com>
Date: 2003-06-21 19:35:04
[Download RAW message or body]
> I want to contribute a simple hack to the gallery team, which I find
> very useful...
> I replaced the "rotate" command in "view_album" (~ Line 498 in 1.3.4)
> with 3 shortcuts for 90,180,270 deg rotate - so no window will popup
> every time...
>
> simply add (or replace) the rotate-choice with:
>
> showChoice(_("left Rotate ") . $label, "rotate_photo.php",array("index"
> => $i, "rotate" => "90"));
> showChoice(_("180 Rotate ") . $label, "rotate_photo.php",array("index"
> => $i, "rotate" => "180"));
> showChoice(_("right Rotate ") . $label, "rotate_photo.php",array("index"
> => $i, "rotate" => "-90"));
>
>
> I used this for a while now and find it very useful...
This is great! Thanks for the simple and easy improvement. It really
saved me a bunch of time putting up pix of my newborn son. :)
In a sort of related issue, I must have upgraded NetPBM or mod_php or
Apache or something else, but I ran into a problem where my pictures
could only rotated counter-clockwise. This is unfortunate since I
happen to take clock wise needing pictures.
I determined a workaround..
In util.php, in the function rotate_image, I changed the lines marked
"PROBLEM" to the lines above them. Perhaps the arguments to pnmflip
have changed or something?
case "NetPBM":
if (!strcmp($target, "90")) {
$args = "-r90";
} else if (!strcmp($target, "-90")) {
$args = "-r2";
# PROBLEM: $args = "-r270";
} else {
$args = "-r1";
# PROBLEM: $args = "-r180";
}
Maybe this will help someone else. The comments in 'pnmflip' indicate
that 'pamflip' is preferred now, but I didn't mess with that.
Thanks,
James
--
James E. Pace <jepace@PaceHouse.com>
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
__[ g a l l e r y - d e v e l ]_________________________
[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic