File geeqie-bigendian.patch of Package geeqie

Index: geeqie-1.1/src/image_load_tiff.c
===================================================================
--- geeqie-1.1.orig/src/image_load_tiff.c
+++ geeqie-1.1/src/image_load_tiff.c
@@ -326,18 +326,21 @@ static gboolean image_loader_tiff_load (
 		/* Turns out that the packing used by TIFFRGBAImage depends on 
         	 * the host byte order... 
 	         */ 
-		while (pixels < pixbuf->pixels + bytes) 
+		{
+		guchar *ptr = pixels;
+		while (ptr < pixels + bytes)
 			{
-			uint32 pixel = *(uint32 *)pixels;
+			uint32 pixel = *(uint32 *)ptr;
 			int r = TIFFGetR(pixel);
 			int g = TIFFGetG(pixel);
 			int b = TIFFGetB(pixel);
 			int a = TIFFGetA(pixel);
-			*pixels++ = r;
-			*pixels++ = g;
-			*pixels++ = b;
-			*pixels++ = a;
+			*ptr++ = r;
+			*ptr++ = g;
+			*ptr++ = b;
+			*ptr++ = a;
 			}
+		}
 #endif
 
 		lt->area_updated_cb(loader, 0, 0, width, height, lt->data);
@@ -419,4 +422,4 @@ void image_loader_backend_set_tiff(Image
 
 
 
-#endif
\ No newline at end of file
+#endif
openSUSE Build Service is sponsored by