Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

PNG re-work: save png_bits and png_interlace tags

  • Loading branch information...
commit 00cff9421a3c96ba790e502183b0075a91abe961 1 parent d3f5821
@tonycoz authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 PNG/impng.c
View
14 PNG/impng.c
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.