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

159
Views
renderizado de imágenes: pixelado no funciona en mi lienzo de javascript

Estoy tratando de agregar mi pixelart al lienzo, pero ahí encontré el problema. Esa imagen está borrosa, así que agregué en canvas css style image-rendering: pixelated. Pero es igual que antes. Cuando agrego el mismo estilo a la imagen fuera del lienzo, está bien pixelado. ¿Alguien puede darme un consejo? ¿Por qué no funciona en lienzo? ¡Gracias por todas las respuestas!

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!