]> Pileus Git - ~andy/gtk/commitdiff
Correct computation of image height. (OneLine): Correct update
authorMatthias Clasen <matthiasc@src.gnome.org>
Sat, 6 Jul 2002 23:54:50 +0000 (23:54 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 6 Jul 2002 23:54:50 +0000 (23:54 +0000)
* io-ico.c (DecodeHeader): Correct computation of image height.
(OneLine): Correct update notification.

gdk-pixbuf/ChangeLog
gdk-pixbuf/io-ico.c

index b0d6ab4b4bda96f5dcaa620af20ab6cd6b18f7fe..e180fd5e15200e01c5e305dfdf6d470bed29f702 100644 (file)
@@ -1,5 +1,8 @@
 2002-07-07  Matthias Clasen  <maclas@gmx.de>
 
+       * io-ico.c (DecodeHeader): Correct computation of image height.
+       (OneLine): Correct update notification.
+
        Load-at-size functionality  (#53726): 
        
        * gdk-pixbuf-io.h (ModuleSizeFunc): New. 
index 1a1de441e4c2c979e5ded37a2a8a33a751842bb1..d39f4c92eda20a0109d255be0b177d04a6d9af0c 100644 (file)
@@ -342,7 +342,7 @@ static void DecodeHeader(guchar *Data, gint Bytes,
                return;
        }
        State->Header.height =
-           (int)(BIH[11] << 24) + (BIH[10] << 16) + (BIH[9] << 8) + (BIH[8])/2;
+           (int)((BIH[11] << 24) + (BIH[10] << 16) + (BIH[9] << 8) + (BIH[8]))/2;
            /* /2 because the BIH height includes the transparency mask */
        if (State->Header.height == 0) {
                g_set_error (error,
@@ -797,9 +797,9 @@ static void OneLine(struct ico_progressive_state *context)
        if (context->updated_func != NULL) {
                (*context->updated_func) (context->pixbuf,
                                          0,
-                                         context->Lines,
+                                         context->Lines % context->Header.height,
                                          context->Header.width,
-                                         context->Header.height,
+                                         1,
                                          context->user_data);
 
        }