Skip to content

Commit 62183bd

Browse files
committed
Added the ability to set the buffered pixels (2 lines of image) to a custom size for use on large images
1 parent 2ad8e58 commit 62183bd

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=PNGdec
2-
version=1.1.4
2+
version=1.1.5
33
author=Larry Bank
44
maintainer=Larry Bank
55
sentence=Universal PNG decoder for MCUs with at least 48K of RAM.

src/PNGdec.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@
4949
/* Defines and variables */
5050
#define PNG_FILE_BUF_SIZE 2048
5151
// Number of bytes to reserve for current and previous lines
52-
// Defaults to 480 32-bit pixels max width
53-
#define PNG_MAX_BUFFERED_PIXELS ((480*4 + 1)*2)
52+
// Defaults to 320 32-bit pixels max width
53+
// but can be overidden with a macro defined at compile time
54+
#ifndef PNG_MAX_BUFFERED_PIXELS
55+
#define PNG_MAX_BUFFERED_PIXELS ((320*4 + 1)*2)
56+
#endif
5457
// PNG filter type
5558
enum {
5659
PNG_FILTER_NONE=0,

0 commit comments

Comments
 (0)