Author: pbartok
Date: 2005-03-17 06:08:15 -0500 (Thu, 17 Mar 2005)
New Revision: 41935

Modified:
   trunk/libgdiplus/src/ChangeLog
   trunk/libgdiplus/src/gdip.h
   trunk/libgdiplus/src/gdipImage.h
   trunk/libgdiplus/src/image.c
Log:
2005-03-17  Peter Bartok  <[EMAIL PROTECTED]>

        * image.c (iGdipLoadImageFromDelegate_linux): Now calls GetHeader 
          delegate for determining the image type, instead of GetBytes, to
          allow usage with non-seekable streams
        * gdipImage.h: Changed GdipLoadImageFromDelegate_linux() prototype to
          include the new StreamGetHeader method
        * gdip.h: Added definition for new GetHeader delegate



Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog      2005-03-17 10:53:01 UTC (rev 41934)
+++ trunk/libgdiplus/src/ChangeLog      2005-03-17 11:08:15 UTC (rev 41935)
@@ -1,3 +1,12 @@
+2005-03-17  Peter Bartok  <[EMAIL PROTECTED]>
+
+       * image.c (iGdipLoadImageFromDelegate_linux): Now calls GetHeader 
+         delegate for determining the image type, instead of GetBytes, to
+         allow usage with non-seekable streams
+       * gdipImage.h: Changed GdipLoadImageFromDelegate_linux() prototype to
+         include the new StreamGetHeader method
+       * gdip.h: Added definition for new GetHeader delegate
+
 2005-03-15  Jordi Mas i Hernandez  <[EMAIL PROTECTED]>
 
        * graphics.c: Fixes GdipSetWorldTransform. We should copy the passed 
matrix 

Modified: trunk/libgdiplus/src/gdip.h
===================================================================
--- trunk/libgdiplus/src/gdip.h 2005-03-17 10:53:01 UTC (rev 41934)
+++ trunk/libgdiplus/src/gdip.h 2005-03-17 11:08:15 UTC (rev 41935)
@@ -1252,6 +1252,7 @@
 const EncoderParameter *gdip_find_encoder_parameter (GDIPCONST 
EncoderParameters *eps, const GUID *guid);
 
 /* Stream handling bits */
+typedef int (*GetHeaderDelegate) (unsigned char *, int);
 typedef int (*GetBytesDelegate) (unsigned char *, int, BOOL);
 typedef long (*SeekDelegate) (int, int);
 typedef int (*PutBytesDelegate) (unsigned char *, int);

Modified: trunk/libgdiplus/src/gdipImage.h
===================================================================
--- trunk/libgdiplus/src/gdipImage.h    2005-03-17 10:53:01 UTC (rev 41934)
+++ trunk/libgdiplus/src/gdipImage.h    2005-03-17 11:08:15 UTC (rev 41935)
@@ -109,7 +109,8 @@
 GpStatus GdipSetProperyItem (GpImage *image, GDIPCONST PropertyItem *item);
 GpStatus GdipCloneImage(GpImage *image, GpImage **cloneImage);
 
-GpStatus GdipLoadImageFromDelegate_linux (GetBytesDelegate getBytesFunc,
+GpStatus GdipLoadImageFromDelegate_linux (GetHeaderDelegate getHeaderFunc,
+                                         GetBytesDelegate getBytesFunc,
                                           PutBytesDelegate putBytesFunc,
                                          SeekDelegate seekFunc,
                                          CloseDelegate closeFunc,

Modified: trunk/libgdiplus/src/image.c
===================================================================
--- trunk/libgdiplus/src/image.c        2005-03-17 10:53:01 UTC (rev 41934)
+++ trunk/libgdiplus/src/image.c        2005-03-17 11:08:15 UTC (rev 41935)
@@ -1270,7 +1270,8 @@
 }
 
 GpStatus
-GdipLoadImageFromDelegate_linux (GetBytesDelegate getBytesFunc,
+GdipLoadImageFromDelegate_linux (GetHeaderDelegate getHeaderFunc,
+                                GetBytesDelegate getBytesFunc,
                                 PutBytesDelegate putBytesFunc,
                                  SeekDelegate seekFunc,
                                 CloseDelegate closeFunc,
@@ -1284,7 +1285,7 @@
        char format_peek[10];
        int format_peek_sz;
        
-       format_peek_sz = getBytesFunc (format_peek, 10, 1);
+       format_peek_sz = getHeaderFunc (format_peek, 10);
        format = get_image_format (format_peek, format_peek_sz);
        
        switch (format) {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to