Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we expose imagesToIco function please? #10

Closed
wdanilo opened this issue Mar 2, 2020 · 1 comment
Closed

Can we expose imagesToIco function please? #10

wdanilo opened this issue Mar 2, 2020 · 1 comment

Comments

@wdanilo
Copy link

wdanilo commented Mar 2, 2020

I have an use case where I have already different PNG sizes and I do not need auto resizing. There are several reasons for such situation - e.g. different sizes should have different details. I would love to use this library but I need to provide a list of png files to it. Could we expose such functionality?

@steambap
Copy link
Owner

steambap commented Mar 2, 2020

The imagesToIco function only accept an array of Jimp image as input and it is not easy to use. I have added support for list of file path as input, you can use it like this:

const fs = require('fs');
const pngToIco = require('png-to-ico');

pngToIco(['electron256x256.png', 'electron64x64.png', 'electron16x16.png'])
  .then(buf => {
    fs.writeFileSync('app.ico', buf);
  })
  .catch(console.error);

Can you try the new version (v2.1.0) and give me some feedbacks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants