Skip to content

Commit a016cb7

Browse files
committed
Corrected gamma multiplication to resolve the issue reported in #335.
1 parent 5187fad commit a016cb7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

coders/svg.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,11 +611,10 @@ static Image *RenderRSVGImage(const ImageInfo *image_info,Image *image,
611611

612612
gamma=1.0-QuantumScale*(MagickRealType) fill_color.opacity;
613613
gamma=PerceptibleReciprocal(gamma);
614-
fill_color.blue=(Quantum) ((MagickRealType) fill_color.red*gamma);
614+
fill_color.red=(Quantum) ((MagickRealType) fill_color.red*gamma);
615615
fill_color.green=(Quantum) ((MagickRealType) fill_color.green*
616616
gamma);
617-
fill_color.red=(Quantum) ((MagickRealType) fill_color.blue*gamma);
618-
}
617+
fill_color.blue=(Quantum) ((MagickRealType) fill_color.blue*gamma);
619618
#endif
620619
MagickCompositeOver(&fill_color,fill_color.opacity,q,
621620
(MagickRealType) q->opacity,q);

0 commit comments

Comments
 (0)