Permalink
Browse files

PNG re-work: save png_bits and png_interlace tags

  • Loading branch information...
1 parent d3f5821 commit 00cff9421a3c96ba790e502183b0075a91abe961 @tonycoz committed Nov 7, 2011
Showing with 14 additions and 0 deletions.
  1. +14 −0 PNG/impng.c
View
@@ -371,6 +371,20 @@ get_png_tags(i_img *im, png_structp png_ptr, png_infop info_ptr) {
i_tags_setn(&im->tags, "i_aspect_only", 1);
}
}
+ switch (png_get_interlace_type(png_ptr, info_ptr)) {
+ case PNG_INTERLACE_NONE:
+ i_tags_setn(&im->tags, "png_interlace", 0);
+ break;
+ case PNG_INTERLACE_ADAM7:
+ i_tags_set(&im->tags, "png_interlace", "adam7", -1);
+ break;
+
+ default:
+ i_tags_set(&im->tags, "png_interlace", "unknown", -1);
+ break;
+ }
+
+ i_tags_setn(&im->tags, "png_bits", png_get_bit_depth(png_ptr, info_ptr));
}
static void

0 comments on commit 00cff94

Please sign in to comment.