blob: f1ce0ad73f05c378335b3b9d386ca1f4d7041790 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# HG changeset patch
# User Glenn Randers-Pehrson <glennrp+bmo@gmail.com>
# Date 1501028322 14400
# Node ID f423ba88ca4ed01b7143520a7e00c360049aa823
# Parent d1e56efb0162a836707d41182d6d658d1cad49e6
coders/png.c: Fixed writer bug due to missing brackets
diff -r d1e56efb0162 -r f423ba88ca4e coders/png.c
--- a/coders/png.c Tue Jul 25 19:38:39 2017 -0400
+++ b/coders/png.c Tue Jul 25 20:18:42 2017 -0400
@@ -7125,12 +7125,14 @@
png_error(ping, "Could not allocate trans_alpha");
for (i=0; i<(int) number_colors; i++)
- if (trans_alpha[i] == 256)
- ping_trans_alpha[i]=255;
- else
- ping_trans_alpha[i]=(png_byte) trans_alpha[i];
- (void) LogMagickEvent(CoderEvent, GetMagickModule(),
- " Alpha[%d]=%d",(int) i, (int) trans_alpha[i]);
+ {
+ if (trans_alpha[i] == 256)
+ ping_trans_alpha[i]=255;
+ else
+ ping_trans_alpha[i]=(png_byte) trans_alpha[i];
+ (void) LogMagickEvent(CoderEvent, GetMagickModule(),
+ " Alpha[%d]=%d",(int) i, (int) trans_alpha[i]);
+ }
}
}
|