GithubHelp home page GithubHelp logo

Png Error about spritespin HOT 7 CLOSED

giniedp avatar giniedp commented on August 21, 2024
Png Error

from spritespin.

Comments (7)

giniedp avatar giniedp commented on August 21, 2024 1

it does. Please be more specific about your issue.

from spritespin.

castrojunin avatar castrojunin commented on August 21, 2024

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 :-/

from spritespin.

giniedp avatar giniedp commented on August 21, 2024

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

from spritespin.

sebipopa avatar sebipopa commented on August 21, 2024

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

from spritespin.

giniedp avatar giniedp commented on August 21, 2024

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 :)

from spritespin.

sebipopa avatar sebipopa commented on August 21, 2024

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!

from spritespin.

giniedp avatar giniedp commented on August 21, 2024

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

from spritespin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.