Hi
Find below a patch which adds auto-rotation of proof images based on image
EXIF information. It is a revision of a proof-of-concept patch I did up for
gqview 2.0.4 which, for well documented reasons, didn't get anywhere after
submission. The patch below is against geeqie 1.0.
The proof auto-rotation feature is controlled by a new setting in the
"convenience" section of the image preferences dialog. This way the
existing behaviour is still available for those who want to use it.
I find this new feature very useful when preparing proofing sheets and I
suspect others would too. Please consider this for inclusion in geeqie.
Regards
jonathan
diff -ru --unidirectional-new-file geeqie-1.0-orig/src/options.c
geeqie-1.0/src/options.c
--- geeqie-1.0-orig/src/options.c 2010-02-18 07:51:19.000000000 +1030
+++ geeqie-1.0/src/options.c 2010-04-02 20:36:46.448672632 +1030
@@ -66,6 +66,7 @@
options->image.dither_quality = GDK_RGB_DITHER_NORMAL;
options->image.enable_read_ahead = TRUE;
options->image.exif_rotate_enable = TRUE;
+ options->image.exif_proof_rotate_enable = TRUE;
options->image.fit_window_to_image = FALSE;
options->image.limit_autofit_size = FALSE;
options->image.limit_window_size = TRUE;
diff -ru --unidirectional-new-file geeqie-1.0-orig/src/options.h
geeqie-1.0/src/options.h
--- geeqie-1.0-orig/src/options.h 2010-02-18 07:51:19.000000000 +1030
+++ geeqie-1.0/src/options.h 2010-04-02 20:36:17.742672675 +1030
@@ -50,6 +50,7 @@
/* image */
struct {
gboolean exif_rotate_enable;
+ gboolean exif_proof_rotate_enable;
guint scroll_reset_method;
gboolean fit_window_to_image;
gboolean limit_window_size;
diff -ru --unidirectional-new-file geeqie-1.0-orig/src/preferences.c
geeqie-1.0/src/preferences.c
--- geeqie-1.0-orig/src/preferences.c 2010-02-18 07:51:19.000000000 +1030
+++ geeqie-1.0/src/preferences.c 2010-04-02 20:41:25.949672731 +1030
@@ -285,6 +285,7 @@
options->update_on_time_change = c_options->update_on_time_change;
options->image.exif_rotate_enable = c_options->image.exif_rotate_enable;
+ options->image.exif_proof_rotate_enable =
c_options->image.exif_proof_rotate_enable;
options->duplicates_similarity_threshold =
c_options->duplicates_similarity_threshold;
@@ -1309,6 +1310,9 @@
pref_checkbox_new_int(group, _("Auto rotate image using Exif
information"),
options->image.exif_rotate_enable,
&c_options->image.exif_rotate_enable);
+
+ pref_checkbox_new_int(group, _("Auto rotate proofs using Exif
information"),
+ options->image.exif_proof_rotate_enable,
&c_options->image.exif_proof_rotate_enable);
}
/* windows tab */
diff -ru --unidirectional-new-file geeqie-1.0-orig/src/print.c
geeqie-1.0/src/print.c
--- geeqie-1.0-orig/src/print.c 2010-02-18 07:51:19.000000000 +1030
+++ geeqie-1.0/src/print.c 2010-04-02 20:48:31.690672852 +1030
@@ -2189,6 +2189,7 @@
gdouble icon_w, icon_h;
gdouble scale;
gboolean success = TRUE;
+ GdkPixbuf *rotated = NULL;
if (pw->proof_columns < 1 || pw->proof_rows < 1)
{
@@ -2202,6 +2203,11 @@
pixbuf = image_loader_get_pixbuf(il);
+ if (options->image.exif_proof_rotate_enable == TRUE) {
+ rotated = pixbuf_apply_orientation(pixbuf,
il->fd->exif_orientation);
+ pixbuf = rotated;
+ }
+
w = gdk_pixbuf_get_width(pixbuf);
h = gdk_pixbuf_get_height(pixbuf);
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geeqie-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-devel