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
SVG pixelate when using with canvas in full window height and width for all devices

I'm using Jspain library in this project. https://faisalsamroz.com/colorway15/

I drawed SVG image on canvas but it's pixelating even it shows white dots when you fill up black color. Screenshot attached. Please help if someone else faced the same problem.

1

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

When an SVG is rendered to a bitmap - such as a canvas - antialiasing is used to make the edges of the shapes appear smoother.

enter image description here

If you then try to flood fill those bitmap shapes with a colour, those grey edge pixels are going to appear like white lines or spots around the edge of the fill.

There are a few things you can do. For example:

  1. You can disable anti-aliasing in your SVG images. Use shape-rendering="crispEdges" as a property or CSS style. See: https://www.w3.org/TR/SVG11/single-page.html#painting-ShapeRenderingProperty, or

  2. Render the SVG. Then run a threshhold or contrast filter over that image to remove the grey pixels.

about 4 years ago · Santiago Trujillo Report
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!