Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
image-rendering: pixelated doesn't work at my javascript canvas

I'm trying to add my pixelart to the canvas, but there I met the problem. That image is blurry so I added in canvas css style image-rendering: pixelated. But it's same as before. When I add same style to image outside canvas it's well pixelated. Can someone give me a tip? Why it doesn't work in canvas? Thank you for all replies!

Javascript:

    ctx.drawImage(this.img, this.x - this.size/2, this.y - this.size/2, this.size, this.size)

CSS:

#canvas {
    position: relative;
    image-rendering: pixelated;
    width: 256px;
    height: 256px;
}

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!