@@ -309,26 +309,26 @@ gdImagePtr gdImageCreateFromPngCtx (gdIOCtx * infile)
309
309
310
310
case PNG_COLOR_TYPE_GRAY_ALPHA :
311
311
png_set_gray_to_rgb (png_ptr );
312
-
313
- case PNG_COLOR_TYPE_RGB :
314
- case PNG_COLOR_TYPE_RGB_ALPHA :
315
- /* gd 2.0: we now support truecolor. See the comment above
316
- * for a rare situation in which the transparent pixel may not
317
- * work properly with 16-bit channels.
318
- */
319
- if (png_get_valid (png_ptr , info_ptr , PNG_INFO_tRNS )) {
320
- png_get_tRNS (png_ptr , info_ptr , NULL , NULL , & trans_color_rgb );
321
- if (bit_depth == 16 ) { /* png_set_strip_16() not yet in effect */
322
- transparent = gdTrueColor (trans_color_rgb -> red >> 8 ,
323
- trans_color_rgb -> green >> 8 ,
324
- trans_color_rgb -> blue >> 8 );
325
- } else {
326
- transparent = gdTrueColor (trans_color_rgb -> red ,
327
- trans_color_rgb -> green ,
328
- trans_color_rgb -> blue );
329
- }
312
+ fallthrough ;
313
+ case PNG_COLOR_TYPE_RGB :
314
+ case PNG_COLOR_TYPE_RGB_ALPHA :
315
+ /* gd 2.0: we now support truecolor. See the comment above
316
+ * for a rare situation in which the transparent pixel may not
317
+ * work properly with 16-bit channels.
318
+ */
319
+ if (png_get_valid (png_ptr , info_ptr , PNG_INFO_tRNS )) {
320
+ png_get_tRNS (png_ptr , info_ptr , NULL , NULL , & trans_color_rgb );
321
+ if (bit_depth == 16 ) { /* png_set_strip_16() not yet in effect */
322
+ transparent = gdTrueColor (trans_color_rgb -> red >> 8 ,
323
+ trans_color_rgb -> green >> 8 ,
324
+ trans_color_rgb -> blue >> 8 );
325
+ } else {
326
+ transparent = gdTrueColor (trans_color_rgb -> red ,
327
+ trans_color_rgb -> green ,
328
+ trans_color_rgb -> blue );
330
329
}
331
- break ;
330
+ }
331
+ break ;
332
332
}
333
333
334
334
png_read_update_info (png_ptr , info_ptr );
0 commit comments