Open salomvary opened 7 years ago
Instead of throwing, we could just resize it to 256x256
, regardless if resize
is true
or not. I'm also thinking about setting resize
to true
by default since it's really fast anyway and you'd want it in most cases.
@kevva if you can tell me which way you'd like it I'd love to send a PR 🙌
maybe @sindresorhus has the magic answer 🦄 😏
@albinekb, I think the first step is to just resize the image to 256x256
if it's larger. A PR would be greatly appreciated :+1:.
Right.
Also related: https://github.com/kevva/to-ico/issues/20
Generally setting the option {resize: true}
should prevent that.
If it can't downscale, it should fail with a user friendly exception ("Images larger than 256x256 px are not supported").