-diff -upNr epsilon.orig/src/lib/Epsilon.c epsilon/src/lib/Epsilon.c
---- epsilon.orig/src/lib/Epsilon.c 2007-12-05 20:26:23.000000000 -0200
-+++ epsilon/src/lib/Epsilon.c 2007-12-09 12:15:21.000000000 -0200
+diff -upNr epsilon/src/lib/Epsilon.c epsilon.new/src/lib/Epsilon.c
+--- epsilon/src/lib/Epsilon.c 2008-03-06 10:50:30.000000000 -0300
++++ epsilon.new/src/lib/Epsilon.c 2008-05-08 13:53:26.000000000 -0300
@@ -23,6 +23,9 @@
#ifdef HAVE_EPEG_H
#include <Epeg.h>
else
{
dir = PATH_DIR_FAIL;
-@@ -563,10 +579,10 @@ epsilon_generate (Epsilon * e)
-
- if (!e || !e->src || !e->hash)
- return (EPSILON_FAIL);
--
-+
- tw = e->tw;
- th = e->th;
--
-+
- #ifdef HAVE_EPEG_H
- len = strlen (e->src);
- if ((len > 4) &&
@@ -575,15 +591,16 @@ epsilon_generate (Epsilon * e)
_epsilon_file_name(e->tw, e->hash, "jpg", outfile, sizeof(outfile));
epeg_thumbnail_comments_get (im, &info);
}
epeg_decode_size_set (im, tw, th);
epeg_quality_set (im, 100);
-@@ -738,7 +755,7 @@ void
- epsilon_thumb_size(Epsilon *e, Epsilon_Thumb_Size size)
- {
- if (!e) return;
--
-+
- switch (size)
- {
- case EPSILON_THUMB_NORMAL:
-@@ -749,7 +766,11 @@ epsilon_thumb_size(Epsilon *e, Epsilon_T
+@@ -695,18 +712,19 @@ epsilon_generate (Epsilon * e)
+ #ifdef HAVE_PNG_H
+ if (tmp)
+ {
+- iw = imlib_image_get_width ();
+- ih = imlib_image_get_height ();
+- if (iw > ih)
+- {
+- th = e->th * ((double) ih / (double) iw);
+- if (th < 1) th = 1;
+- }
+- else
+- {
+- tw = e->tw * ((double) iw / (double) ih);
+- if (tw < 1) tw = 1;
+- }
++ iw = imlib_image_get_width ();
++ ih = imlib_image_get_height ();
++ /* XXX - hack to force fixed height in case of tw != th (canola) */
++ if (iw > ih && tw == th)
++ {
++ th = ((unsigned long) e->tw * ih) / iw;
++ if (th < 1) th = 1;
++ }
++ else
++ {
++ tw = ((unsigned long) e->th * iw) / ih;
++ if (tw < 1) tw = 1;
++ }
+ imlib_context_set_cliprect (0, 0, tw, th);
+ if ((src = imlib_create_cropped_scaled_image (0, 0, iw, ih, tw, th)))
+ {
+@@ -749,7 +767,11 @@ epsilon_thumb_size(Epsilon *e, Epsilon_T
e->tw = THUMB_SIZE_LARGE;
e->th = THUMB_SIZE_LARGE;
break;
}
-diff -upNr epsilon.orig/src/lib/Epsilon.h epsilon/src/lib/Epsilon.h
---- epsilon.orig/src/lib/Epsilon.h 2007-12-05 20:26:23.000000000 -0200
-+++ epsilon/src/lib/Epsilon.h 2007-12-09 12:15:21.000000000 -0200
+diff -upNr epsilon/src/lib/Epsilon.h epsilon.new/src/lib/Epsilon.h
+--- epsilon/src/lib/Epsilon.h 2008-03-06 10:50:30.000000000 -0300
++++ epsilon.new/src/lib/Epsilon.h 2008-05-08 13:53:26.000000000 -0300
@@ -58,7 +58,8 @@ typedef struct _Epsilon_Info Epsilon_Inf
enum _Epsilon_Thumb_Size
{
};
typedef enum _Epsilon_Thumb_Size Epsilon_Thumb_Size;
-diff -upNr epsilon.orig/src/lib/epsilon_thumb.c epsilon/src/lib/epsilon_thumb.c
---- epsilon.orig/src/lib/epsilon_thumb.c 2007-12-05 20:26:23.000000000 -0200
-+++ epsilon/src/lib/epsilon_thumb.c 2007-12-09 12:15:21.000000000 -0200
+diff -upNr epsilon/src/lib/epsilon_thumb.c epsilon.new/src/lib/epsilon_thumb.c
+--- epsilon/src/lib/epsilon_thumb.c 2008-03-06 10:50:30.000000000 -0300
++++ epsilon.new/src/lib/epsilon_thumb.c 2008-05-08 13:53:26.000000000 -0300
@@ -218,6 +218,9 @@ epsilon_cb_server_data(void *data, int t
if (e->server != epsilon_server)
return 1;
msg = e->data;
Epsilon_Request *thumb;
-diff -upNr epsilon.orig/src/lib/exiftags/canon.c epsilon/src/lib/exiftags/canon.c
---- epsilon.orig/src/lib/exiftags/canon.c 2007-12-05 20:26:23.000000000 -0200
-+++ epsilon/src/lib/exiftags/canon.c 2007-12-09 12:15:21.000000000 -0200
+diff -upNr epsilon/src/lib/exiftags/canon.c epsilon.new/src/lib/exiftags/canon.c
+--- epsilon/src/lib/exiftags/canon.c 2008-03-06 10:50:30.000000000 -0300
++++ epsilon.new/src/lib/exiftags/canon.c 2008-05-08 13:53:26.000000000 -0300
@@ -52,7 +52,7 @@
struct ccstm {
int32_t val;