Web images - new things from an old...

User 122279 Photo


Senior Advisor
14,655 posts

Wayan Jaya Space Cadet wrote:
Inger wrote:
Have you done any tests with a .png with transparent background?


Yes and I can't get it to work it always puts a black background to it.


I have some .png files with transparent backgrounds sitting on my desktop right now, and there they are shown with a black background. But once I apply them to some web page, the background is indeed transparent. Did you also try to insert your png into a page?
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2699991 Photo


Registered User
5,414 posts
Online Now

Inger wrote:
Wayan Jaya Space Cadet wrote:
Inger wrote:
Have you done any tests with a .png with transparent background?


Yes and I can't get it to work it always puts a black background to it.


I have some .png files with transparent backgrounds sitting on my desktop right now, and there they are shown with a black background. But once I apply them to some web page, the background is indeed transparent. Did you also try to insert your png into a page?

We actually no I didn't try
Just assumed it wasn't working.
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS


A simple quick way to contact me
https://rsd-tutorialscom.coffeecup.com/index.html
User 379556 Photo


Registered User
1,608 posts
Online Now

XnView works for me regarding the transparency. I have put a file here containing the following:
(a) a .jpg of a snapshot I took in London's Trafalgar Square;
(b) a .png created from (a) in Affinity Photo by selecting and removing the sky, and exporting as PNG;
(c) a .avif file created from (b) using Tools > Batch convert ...
(d) a screen-shot of the convert settings used for (c).

If the transparency shows properly for others, I'm wondering whether the .png files which showed the black background were exported as PNG while Photoshop or Affinity Photo had more than one layer.

Frank
User 2699991 Photo


Registered User
5,414 posts
Online Now

Well that could be it BCS sometimes I can have loads of layers and sometimes I forget to flatten them before saving.
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS


A simple quick way to contact me
https://rsd-tutorialscom.coffeecup.com/index.html
User 122279 Photo


Senior Advisor
14,655 posts

I made a wee test with Frank's avif file. With HTML Editor I just made a page with some background colour and inserted the avif image. I was not able to select it, but had to write in the file name manually. Then I tested the page in Chrome.
Result: The transparency works!
Attachments:
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 379556 Photo


Registered User
1,608 posts
Online Now

That's encouraging, Inger. I found that your HTML file also works showing the transparency in the Brave browser.

In Firefox Developer Edition I used about:config and found 'image.avif.enabled' and set it to True. Full implementation there has not yet occurred: the image showed, but with a black background instead of the transparency. It will be interesting to see how quickly Firefox fully supports the format.

With at least two browsers now properly reading AVIF files, a long-standing viewer (XnView) both viewing and converting to that format, and the compression being so good, the future looks promising for it.

My thanks to Stonecherub for drawing attention to this.

Frank

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.