Daniel Bulant
31f3472b34
Fix relative import exports
2020-05-29 19:23:47 +02:00
Daniel Bulant
8eabb688fe
Remove strict since it's default in deno
2020-05-29 18:58:20 +02:00
divdavem
792e432c9c
fixes error when trying to access this._reads in chunkstream.js ( #147 )
2020-04-15 21:04:48 +02:00
Luke Page
32271b56e3
prettier, es6, upgrades
2020-04-09 20:28:27 +02:00
smallnamespace
5d5f543c41
Fix https://github.com/lukeapage/pngjs/issues/129 ( #130 )
2020-04-09 15:50:37 +02:00
Zachary Holyszko
257a4c972d
fix(buffer): migrate to safe constructor methods ( #134 )
...
Co-authored-by: Zachary Holyszko <zholyszko@dmdconnects.com>
2020-04-09 15:48:18 +02:00
greenkeeper[bot]
7e160967c9
Update eslint to the latest version 🚀 ( #86 )
2019-03-09 13:51:49 +01:00
Cory Snider
0b5822a4be
Emit an error if the image is truncated ( #118 )
...
If the image data is truncated on a chunk read boundary, PNGjs would
hang. Now it emits an error event.
2019-03-08 06:31:01 +01:00
Liam McLoughlin
decc76f686
Return a correct alpha value in the metadata callback when a tRNS chunk is present ( #119 )
...
* Fix "metadata" alpha property to respect presence of tRNS chunk
* Emit metadata at first IDAT chunk
* Fix typo
2019-03-08 06:27:54 +01:00
Victor Homyakov
2d78949365
Speed up mapImage8Bit and mapImageCustomBit ( #123 )
...
Inner loop with `if()` comparison is eliminated and replaced with
function call.
Synthetic benchmark shows 1.5x increase in speed of mapImage8Bit for big
PNG images (e.g. 4064 x 2338, 8-bit/color RGBA, non-interlaced
screenshots).
2019-03-08 06:25:36 +01:00
Ryo Kawaguchi
0a6201df87
Support up to node v9 ( #110 )
...
* Fix compatibility issues with node 9.
* Fix async tests.
2018-04-19 22:04:14 +02:00
Luke Page
32d0580228
Fix filter none. Fixes #92
2018-02-16 10:03:37 +01:00
Morgan Intrator
f5acfc5855
Kill zlib ( #102 )
2018-02-16 09:54:16 +01:00
Jesus Nuevo
bdc384e9c3
Fixes for #88 and #93 ( #94 )
2017-11-15 07:47:10 +01:00
Jesus Nuevo
2c37ebcbf2
Add writing 16 bit channels and support for grayscale input ( #82 )
...
* Add support for writing 16 bit channels
* Fix for quick exit from the bitpacker
* Add example and describe bitDepth option in README
2017-08-05 10:41:47 +02:00
Eugene Kulabuhov
f28d2a9e02
Added support for encoding 8-bit grayscale images (colorType = 0 and 4) ( #76 )
...
* Added support for encoding 8-bit grayscale images (colorType = 4)
* Fixed unit tests, updated README
* [README.md] Added Browserify and TOC
2017-04-30 11:45:27 +02:00
toriningen
70f55344de
Fix for bug #78 ( #79 )
...
* Fixed bug #78 .
Implemented support for PNGs with unterminated IDAT stream.
Implemented synchronous inflater with length limit support.
* Removed duplicate line.
* Fixing linter errors.
* Fixing linter errors.
* no finishFlushFlag on Node 4
* It now passes tests on Node 4
2017-04-30 11:32:05 +02:00
Xin-Xin Wang
e3bef7d1a6
Fix issue #65 (single pixel png causes an error) ( #72 )
2017-02-15 18:19:32 +01:00
Martin Segado
3ad37374e3
fix: explicitly coerce all pixel-dimensioned inputs to integers ( #66 )
2017-01-09 07:12:46 +01:00
Luke Page
96c67ea08d
drop support for node < 4
2016-08-03 05:37:26 +02:00
Balthazar Gronon
f49e99aa28
chore(chunkstream): minor typo ( #58 )
2016-07-06 18:28:57 +02:00
Luke Page
b914ab4d80
remove node-zlib-backport as a dependency as it causes too many problems. Fixes #48
2016-04-27 05:35:51 +02:00
Mitar
e1c1022162
Backporting to 0.10
...
* Backporting to 0.10 for Meteor.
* Still use zlib if possible.
* Updated README.
* Try Travis CI for 0.10.
2016-04-21 23:45:11 +02:00
Gusts Kaksis
c76df92fd4
Moved packer processing options to Packer class. Use zlib deflate options in PackerSync.
2015-12-04 10:35:19 +02:00
Gusts Kaksis
bc271fcf38
Added missing "use strict" and fixed an ESLint no-param-reassign warning
2015-12-03 18:31:56 +02:00
Gusts Kaksis
ac815b87ee
Implemented symetric PNG.sync.write to complement PNG.sync.read
2015-12-03 18:00:33 +02:00
Gusts Kaksis
42fd49f0b6
Begin to lay out a symetric packer api for synchronous usage.
2015-11-25 14:36:22 +02:00
Chris Barber
76450f7e2d
Added bgColor support when removing alpha from image.
2015-10-23 14:05:00 -05:00
Elisée
7717852dad
Remove "src" parameter from PNG.prototype.bitblt
2015-10-08 09:31:32 +02:00
Luke Page
d7a8638b72
do not use the output format to determine the input one
2015-09-13 19:19:32 +01:00
Luke Page
d08fc30edb
Use lowercase BPP consistently
2015-09-13 18:43:44 +01:00
Luke Page
159221c115
move color type constants to constants. Revert change requiring default options on null.
2015-09-13 18:40:53 +01:00
michuNEEO
6467ad747b
update readme, fix stlye issues
2015-09-13 14:41:40 +02:00
michuNEEO
83d60edeaf
poc to support colortype 2
2015-09-13 14:31:22 +02:00
Martin von Gagern
a0596a58c4
Introduce deflateFactory option to packer
...
The main application motivating this addition is the creation of
reproducible compression results. Since `zlib` is shipped with node.js, we
have no control over its version via npm. To guarantee reproducible
results, other libraries (like pako) could be used, with a fixed version
number to guarantee consistent behavior. This modification provides a hook
to allow such usage.
2015-08-28 09:59:28 +02:00
Luke Page
15896644fd
Expose all info (palette and transparent color) to the user
2015-08-22 07:03:41 +01:00
Luke Page
ba44715818
Fix #21 - interlaced png's that were not square failed because of typo
2015-08-21 08:11:10 +01:00
Luke Page
6cf6d787bc
catch async exceptions and emit error
2015-08-08 06:53:15 +01:00
Luke Page
3ccd332f5a
refactor - shorten method param count
2015-08-08 06:42:22 +01:00
Luke Page
3ddd3f11a3
split out bitmapper
2015-08-07 20:46:28 +01:00
Luke Page
adf5216a49
Tidy up filtering.
2015-08-07 07:59:57 +01:00
Luke Page
119d403098
Rename createData
2015-08-07 07:31:14 +01:00
Luke Page
2fbf81e598
Finished is now optional
2015-08-06 19:57:39 +01:00
Luke Page
735902ff9e
refactor parser-sync
2015-08-06 19:46:30 +01:00
Luke Page
79465895af
Gamma division constant
2015-08-06 18:50:36 +01:00
Luke Page
f84416a523
Merge branch 'master' of github.com:lukeapage/node-pngjs2
2015-08-05 23:21:36 +01:00
Luke Page
71a371d6cd
Pull out format normaliser. Fix #18
2015-08-05 23:21:28 +01:00
Luke Page
c450597b09
Merge branch 'master' of github.com:lukeapage/node-pngjs2
2015-08-05 17:00:47 +01:00
Luke Page
ff9d322a36
add ability to write gamma chunks
2015-08-05 17:00:37 +01:00
Luke Page
41c5a14950
Remove copyright from individual files. It is included in the project once.
2015-08-04 23:03:38 +01:00