Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/epsilon

Dir     : e17/libs/epsilon/src/lib


Modified Files:
        Epsilon.c 


Log Message:


limit thumb to 1x1 pixel - no smaller!

===================================================================
RCS file: /cvs/e/e17/libs/epsilon/src/lib/Epsilon.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- Epsilon.c   30 Oct 2007 23:59:31 -0000      1.39
+++ Epsilon.c   1 Nov 2007 21:50:31 -0000       1.40
@@ -572,10 +572,12 @@
       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;
        }
       epeg_decode_size_set (im, tw, th);
       epeg_quality_set (im, 100);
@@ -692,10 +694,12 @@
        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;
          }
        imlib_context_set_cliprect (0, 0, tw, th);
        if ((src = imlib_create_cropped_scaled_image (0, 0, iw, ih, tw, th)))



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to