Atozed Forums
Make TIWImage transparent - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Make TIWImage transparent (/thread-2230.html)



Make TIWImage transparent - KristofVR - 01-09-2021

How can I make a TIWimage transparent ? 

I have tried loading a BMP image as 'picture', and I have set the property 'Transparentcolor' to clWebWHITE.

I would now expect that all white areas in the BMP become transparent, but this does not happen.


RE: Make TIWImage transparent - Alexandre Machado - 01-12-2021

If you want your application to scale, prefer TIWImageFile over TIWImage. TIWImage needs to be converted at runtime into a PNG (or JPG) to be served.
Also, it can't be cached by the web browser.

Best thing to do is: Create a transparent PNG file, save it into wwwroot folder and use the file name in TIWImageFile.


RE: Make TIWImage transparent - KristofVR - 01-12-2021

Loading the image with a transparent color seems to do the job. Thanks!


RE: Make TIWImage transparent - Alexandre Machado - 01-21-2021

This has been fixed in the new update that we are building. Cheers,