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

Png Error #33

Closed
castrojunin opened this issue Dec 2, 2016 · 7 comments
Closed

Png Error #33

castrojunin opened this issue Dec 2, 2016 · 7 comments

Comments

@castrojunin
Copy link

This plugin not working with png images.

@giniedp
Copy link
Owner

giniedp commented Dec 2, 2016

it does. Please be more specific about your issue.

@castrojunin
Copy link
Author

castrojunin commented Dec 2, 2016

Desculpe @giniedp, o problema era o tamanho da imagem(3MB). Já resolvi e está funcionando como você disse.

I wrote portuguese because my english is very basic :-/

@giniedp
Copy link
Owner

giniedp commented Dec 2, 2016

yes, image size is important. everything above 2 Megapixels will be scaled down by some browsers. Spritespin tries to detect that, but the detection might fail on some PNG images, that have transparency

@giniedp giniedp closed this as completed Dec 2, 2016
@sebipopa
Copy link

@giniedp I ran into an issue with a transparent png, the size was all crazy. I've set detectSubsampling:false and everything worked out.

@giniedp
Copy link
Owner

giniedp commented Jun 26, 2017

yes, subsampling detection with transparent images is not reliable. It goes wrong when border pixels or the outline of the image is transparent. There is a comment about that in the source code

// This method unfortunately does not work for images that have transparent background.

if anyone knows about a more reliable mechanism your pull reuest is welcome :)

@sebipopa
Copy link

Yes, I saw the comment, that's how I knew to disable it. Maybe a more clear explanation in the sample code (http://spritespin.ginie.eu/howto.html - Options) would help people that are getting this behavior.

Thanks for your plugin!

@giniedp
Copy link
Owner

giniedp commented Jun 26, 2017

agree, that topic should get a section in the howto page

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

3 participants