]> mj.ucw.cz Git - libucw.git/commitdiff
another bugfix
authorPavel Charvat <pavel.charvat@netcentrum.cz>
Tue, 8 Aug 2006 17:42:54 +0000 (19:42 +0200)
committerPavel Charvat <pavel.charvat@netcentrum.cz>
Tue, 8 Aug 2006 17:42:54 +0000 (19:42 +0200)
images/io-main.c

index c080b60c04b2339bdd9d35506b0c33f31c46be41..c0907841c19078629b4e9a4d6c93d0016df444f9 100644 (file)
@@ -283,8 +283,9 @@ image_io_read_data_finish(struct image_io_read_data_internals *rdi, struct image
       if ((io->flags ^ rdi->image->flags) & IMAGE_ALPHA)
         {
          DBG("Aplying background");
-         uns flags = rdi->image->flags & ~IMAGE_ALPHA; 
-         rdi->need_transformations = (flags & io->flags) & IMAGE_NEW_FLAGS;
+         uns flags = rdi->image->flags & ~IMAGE_ALPHA;
+         if (!(rdi->need_transformations = (flags & io->flags) & (IMAGE_NEW_FLAGS & ~IMAGE_PIXELS_ALIGNED)))
+           flags = io->flags;
          struct image *img = image_new(io->thread, io->cols, io->rows, flags, rdi->need_transformations ? NULL : io->pool);
          if (unlikely(!img))
            {