Skip to content

Commit

Permalink
Corrected gamma multiplication to resolve the issue reported in #335.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Aug 17, 2024
1 parent 5187fad commit a016cb7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions coders/svg.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,11 +611,10 @@ static Image *RenderRSVGImage(const ImageInfo *image_info,Image *image,

gamma=1.0-QuantumScale*(MagickRealType) fill_color.opacity;
gamma=PerceptibleReciprocal(gamma);
fill_color.blue=(Quantum) ((MagickRealType) fill_color.red*gamma);
fill_color.red=(Quantum) ((MagickRealType) fill_color.red*gamma);
fill_color.green=(Quantum) ((MagickRealType) fill_color.green*
gamma);
fill_color.red=(Quantum) ((MagickRealType) fill_color.blue*gamma);
}
fill_color.blue=(Quantum) ((MagickRealType) fill_color.blue*gamma);
#endif
MagickCompositeOver(&fill_color,fill_color.opacity,q,
(MagickRealType) q->opacity,q);
Expand Down

0 comments on commit a016cb7

Please sign in to comment.