Skip to main content
danielo33771543
Known Participant
August 1, 2018
Answered

My html canvas has a whitish background around its edges hw do i remove it.

  • August 1, 2018
  • 2 replies
  • 278 views

my html canvas has has a whitish background and also the file its self does not look sharp. any help would be good. I would like my html canvas file to look as sharp and clean like this. any ways to do it would be welcome

This topic has been closed for replies.
Correct answer JoãoCésar17023019

Hi.

Make sure to:

- Check the responsive options in the Publish Settings;

- Use PNGs with 32 bit and JPEG with 100 quality if you are using spritesheets;

- In the Library panel, right-click your images and set them to have a lossless (PNG/GIF) compression and test if smoothing works best for you turned on or off.

I hope this helps.

Regards,

JC

2 replies

Legend
August 1, 2018

The canvas is rectangular. What your screenshot shows is not a rectangular whitish outline. This means the problem is your assets, not the canvas. The white outlines you have on your assets are because they were composed with antialiased edges against a white background. There are two ways to fix this. First, you can compose your assets without antialiased edges so they don't get color fringing. Second, you can save you assets as PNGs with an alpha channel (transparent background). This will allow your assets' edges to composite smoothly with whatever's behind them, at the cost of a slightly larger file size.

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
August 1, 2018

Hi.

Make sure to:

- Check the responsive options in the Publish Settings;

- Use PNGs with 32 bit and JPEG with 100 quality if you are using spritesheets;

- In the Library panel, right-click your images and set them to have a lossless (PNG/GIF) compression and test if smoothing works best for you turned on or off.

I hope this helps.

Regards,

JC

danielo33771543
Known Participant
August 1, 2018

Thanks