Skip to content

Commit

Permalink
PNG support overhaul (#99)
Browse files Browse the repository at this point in the history
* add png and raw grayscale image support

* add grayscale and indexed PNG support
- change PNG_COLOR_* values to be an enum instead of macros
- adjust png_info to contain the color type instead of ncolours
- properly handle all possible color type
- process palette chunk for indexed images

* add examples for index/greyscale PNGs

Co-authored-by: Andre Renaud <[email protected]>
  • Loading branch information
JulianGmp and AndreRenaud authored Aug 20, 2021
1 parent fa22dc6 commit 0d5fa3b
Show file tree
Hide file tree
Showing 7 changed files with 307 additions and 40 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Supports the following PDF features
* Bookmarks
* Barcodes (Code-128 & Code-39)
* Embedded images
* PPM
* PPM/PGM (binary format only)
* JPEG
* PNG
* PNG (Alpha Channels are not supported)
* BMP

Example usage
Expand Down
46 changes: 46 additions & 0 deletions data/bee.pgm

Large diffs are not rendered by default.

Binary file added data/grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/indexed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0d5fa3b

Please sign in to comment.