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

change to sharp #136

Merged
merged 2 commits into from
Dec 2, 2021
Merged

change to sharp #136

merged 2 commits into from
Dec 2, 2021

Conversation

mifi
Copy link
Contributor

@mifi mifi commented Nov 17, 2021

See #135

to allow removing unmaintained phantomjs
@mifi
Copy link
Contributor Author

mifi commented Nov 17, 2021

I tested it on my icons for https://github.com/mifi/lossless-cut and the icons look roughly the same (not pixel exact but very similar)

@akabekobeko
Copy link
Owner

Thank you! Check it out this weekend.

@akabekobeko
Copy link
Owner

@mifi
I have confirmed that sharp can generate PNG from SVG. However, when I tried with examples/ on this project, the top and bottom seem to be cut.

$ npm pack
$ mv icon-gen-2.1.0.tgz examples/
$ cd examples
$ npm un icon-gen
$ npm i icon-gen-2.1.0.tgz
$ npm run ts:svg

Are there any settings to avoid this problem?

svg2png

228

sharp

favicon-228

@mifi
Copy link
Contributor Author

mifi commented Dec 1, 2021

I updated the code now, so it should now generate those correctly

here's how i ran it:

npm run watch
cd dist/bin
node . -i ../../examples/data/sample.svg -o ../../examples/data/ --icns --favicon

@mifi
Copy link
Contributor Author

mifi commented Dec 1, 2021

I also confirm it still works with my project https://github.com/mifi/lossless-cut after these changes (generates the same icons)

@akabekobeko akabekobeko merged commit ec54f37 into akabekobeko:master Dec 2, 2021
@akabekobeko
Copy link
Owner

@mifi
I also confirmed that the whole image was rendered with the new commit in my environment, so I merged it. thank you!

@mifi
Copy link
Contributor Author

mifi commented Dec 2, 2021

great! thanks for making this module btw. all these different icon standards is a jungle so it's nice to have one package to generate all of them from svg.

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

Successfully merging this pull request may close these issues.

None yet

2 participants