Coder Social home page Coder Social logo

Comments (4)

JosephTico avatar JosephTico commented on May 18, 2024

Here's an interesting and very complete article about that.

http://html5hub.com/state-of-nearest-neighbor-interpolation-in-canvas/#i.3bx5iz87ues5sm

The thing is, there's still no proper cross-browser support for this method of upscaling and also it will have a performance impact.

from pokesprite.

msikma avatar msikma commented on May 18, 2024

Thanks. This article seems to be a bit old, so with some luck things might have improved in Chrome.

It's unfortunate that IE doesn't have a valid method for doing this. However, using a modified image with doubled pixels might not be a bad thing (as long as it's loaded only when the pixel density is greater than 1.0) since it should not be that much larger than the non-upscaled version.

from pokesprite.

JosephTico avatar JosephTico commented on May 18, 2024

Well, now this can be implemented. This can be done by adding the following styles to .pkspr, and will work in most browsers.

  -ms-interpolation-mode: nearest-neighbor;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;

from pokesprite.

msikma avatar msikma commented on May 18, 2024

This has been implemented. Thanks for pointing me to this code @Josephvb10. 👍

from pokesprite.

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.