honor the offset layer property
authorStephane Delcroix <stephane@delcroix.org>
Sun, 1 Mar 2009 12:28:11 +0000 (13:28 +0100)
committerStephane Delcroix <stephane@delcroix.org>
Sun, 1 Mar 2009 12:28:11 +0000 (13:28 +0100)
io-xcf.c

index 272f750..376dab8 100644 (file)
--- a/io-xcf.c
+++ b/io-xcf.c
@@ -490,7 +490,7 @@ xcf_image_load_real (FILE *f, XcfContext *context, GError **error)
 
                        rle_decode (f, pixels, tw*th, layer->type);
 
-                       int origin = 4 * ox + rowstride * oy ;
+                       int origin = 4 * (ox + layer->dx) + rowstride * (oy + layer->dy) ;
 
                        int j;
                        for (j=0; j<th;j++) {