Guest User

Untitled

a guest
May 16th, 2015
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.43 KB | None | 0 0
  1. diff -Naur ImageMagick-6.9.1-2/magick/resize.c "copy of ImageMagick-6.9.1-2/magick/resize.c"
  2. --- ImageMagick-6.9.1-2/magick/resize.c 2014-12-25 13:05:34.000000000 -0500
  3. +++ "copy of ImageMagick-6.9.1-2/magick/resize.c"   2015-05-16 23:29:17.110388000 -0400
  4. @@ -1895,12 +1895,12 @@
  5.        return(rescale_image);
  6.      }
  7.    map="RGB";
  8. -  if (image->matte != MagickFalse)
  9. +  if (image->matte == MagickTrue)
  10.      map="RGBA";
  11.    if (image->colorspace == CMYKColorspace)
  12.      {
  13.        map="CMYK";
  14. -      if (image->matte != MagickFalse)
  15. +      if (image->matte == MagickTrue)
  16.          map="CMYKA";
  17.      }
  18.    pixel_info=AcquireVirtualMemory(image->columns,image->rows*strlen(map)*
  19. @@ -1959,14 +1959,14 @@
  20.      pixel.blue=QuantumRange*(packet[2]/255.0);
  21.      if (image->colorspace != CMYKColorspace)
  22.        {
  23. -        if (image->matte == MagickFalse)
  24. -          pixel.opacity=QuantumRange*(packet[3]/255.0);
  25. +        if (image->matte == MagickTrue)
  26. +          pixel.opacity=QuantumRange*(1-packet[3]/255.0);
  27.        }
  28.      else
  29.        {
  30.          pixel.index=QuantumRange*(packet[3]/255.0);
  31. -        if (image->matte == MagickFalse)
  32. -          pixel.opacity=QuantumRange*(packet[4]/255.0);
  33. +        if (image->matte == MagickTrue)
  34. +          pixel.opacity=QuantumRange*(1-packet[4]/255.0);
  35.        }
  36.      SetPixelPacket(rescale_image,&pixel,q,rescale_indexes);
  37.      if (SyncCacheViewAuthenticPixels(rescale_view,exception) == MagickFalse)
Advertisement
Add Comment
Please, Sign In to add comment