kevva / to-ico

Convert PNG to ICO in memory
MIT License
137 stars 19 forks source link

Document max size = 256 #20

Closed DanielRuf closed 3 years ago

DanielRuf commented 4 years ago

Currently only input images up to 256px are supported. https://github.com/kevva/to-ico/blob/master/index.js#L32

$ node src/scripts/favicon.js
(node:18127) ExperimentalWarning: The fs.promises API is experimental
(node:18127) UnhandledPromiseRejectionWarning: RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= 0 and <= 255. Received 1024
    at writeU_Int8 (internal/buffer.js:555:11)
    at Buffer.writeUInt8 (internal/buffer.js:565:10)
    at createDirectory (/home/druf/pwa/client/node_modules/to-ico/index.js:32:6)
    at Promise.all.then.data (/home/druf/pwa/client/node_modules/to-ico/index.js:98:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:18127) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:18127) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Done in 0.50s.