Add patch fix-XPM.patch (upstream fix for #1217178).
parent
da4cdb6e83
commit
c6e35d1ec2
@ -0,0 +1,20 @@
|
||||
--- magick/colormap.c.orig 2014-12-25 21:05:34.000000000 +0300
|
||||
+++ magick/colormap.c 2015-11-21 16:06:49.632335362 +0300
|
||||
@@ -112,7 +112,7 @@
|
||||
assert(image->signature == MagickSignature);
|
||||
if (image->debug != MagickFalse)
|
||||
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
|
||||
- image->colors=MagickMax(colors,2);
|
||||
+ image->colors=MagickMax(colors,1);
|
||||
if (image->colormap == (PixelPacket *) NULL)
|
||||
image->colormap=(PixelPacket *) AcquireQuantumMemory(image->colors,
|
||||
sizeof(*image->colormap));
|
||||
@@ -131,7 +131,7 @@
|
||||
size_t
|
||||
pixel;
|
||||
|
||||
- pixel=(size_t) (i*(QuantumRange/(image->colors-1)));
|
||||
+ pixel=(size_t) (i*(QuantumRange/MagickMax(colors-1,1)));
|
||||
image->colormap[i].red=(Quantum) pixel;
|
||||
image->colormap[i].green=(Quantum) pixel;
|
||||
image->colormap[i].blue=(Quantum) pixel;
|
Loading…
Reference in new issue