Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
Add option to change IDAT chunk size
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelerz committed Sep 14, 2015
1 parent a74c939 commit 05e2153
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/png/chunks/IHDR.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,11 +760,12 @@ module.exports = {
* @method _separate
* @param {Buffer} buffer
* @param {object} options Encoding options
* @param {int} [options.chunkSize=8192] Max. size of the IDAT chunk
* @private
*/
_separate: function (buffer, options) {

var chunkLength = 8192,
var chunkLength = options.chunkSize || 8192,
chunkQuantity = Math.ceil(buffer.length / chunkLength),

Chunk = require('../chunk'),
Expand Down

0 comments on commit 05e2153

Please sign in to comment.