Dave Posted May 29, 2023 Report Share Posted May 29, 2023 Does anyone know of a way to make the background of UniPic images invisible? For example, I have used the "UniPics-Lights & Lamps-074.png" image. It is a green circle but has a white square background. If I use it on a screen with a white background, the square is not visible, but if I use it on any other colour background, the white square is visible. I could save them as a bitmap and edit the background out, but that is a lot of work to do for every image. I saw another image, almost identical, in a sample PID program, "UniPics-Leds-Green-04-On.Png" . This image has a transparent square background, but I can't find the source for this image, and I don't see any property that I can set the background to transparent. Link to comment Share on other sites More sharing options...
Saragani Posted May 30, 2023 Report Share Posted May 30, 2023 The image is a png with a transparent background. It should have been drawn transparent. If you use other UniPics with transparent backgrounds, do you see them with white/black background, or with a transparent one? What about other transparent images you download from the web? Link to comment Share on other sites More sharing options...
pascal Posted May 31, 2023 Report Share Posted May 31, 2023 Dave, https://onlinepngtools.com/create-transparent-png I often use this for modification of self designed png files Link to comment Share on other sites More sharing options...
Dave Posted May 31, 2023 Author Report Share Posted May 31, 2023 Hi Saragani. So far, all of the unipics that I have used display the white background...but I have mostly only used the lamps. I will check some others though, just to see. The few .png images that I have downloaded from the web are the same, but usually darker background. Pascal, thanks for the link. That looks like a very useful tool. I will try it out Link to comment Share on other sites More sharing options...
Saragani Posted June 6, 2023 Report Share Posted June 6, 2023 @Dave Then it might be something with your computer. Currently I don't know what can cause this issue. Do other elements (like circular gauge, Button, linear gauge, etc.) have a transparent background? Btw, can you download the following image? https://www.transparentpng.com/thumb/google-logo/google-logo-png-icon-free-download-SUF63j.png Then put it in a screen and tell me if you see it transparent. Link to comment Share on other sites More sharing options...
Dave Posted June 8, 2023 Author Report Share Posted June 8, 2023 "Btw, can you download the following image?" I downloaded the image and it did indeed have a transparent background. Unipics from the folder, "Unitronics \ Unitronics Visilogic_C\ Data \ ImagesC \ UniPics \ Large \ Switches \ Indexed Large" all still display a white background. I tried the "onlinepngtools" app, and it worked to make the background transparent, but now I have the diagonal lines across the image. Also, I had to save it to a word doc first, then "save as picture" in order to be able to use it with UniLogic. Link to comment Share on other sites More sharing options...
Saragani Posted June 8, 2023 Report Share Posted June 8, 2023 @Dave Thanks for the update. It might be something with the watermark removal code that somehow fails on your computer, and somehow creates a white background, or something with the image itself (and not the watermarked image). I have not encountered this issue before, so I will have to investigate and dig in the code. I might give you a small tool in order to debug the issue. I hope to work on it next week as soon as possible. Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted June 9, 2023 MVP 2023 Report Share Posted June 9, 2023 Dave, a question that might be relevant here is what image programs do you have on your computer? Perhaps they are basically changing the way the PC handles any .png file....changing the bit format etc. which is then flowing on into your usage issues. cheers, Aus Link to comment Share on other sites More sharing options...
Dave Posted June 9, 2023 Author Report Share Posted June 9, 2023 I have had this issue right from the start with UniLogic...on multiple PC's and laptops. Even with VisiLogic, but there I can check the "transparent background" check box to easily eliminate it. In UniLogic, I set the background fill to transparent and it does nothing. I was just putting up with it up until now, but it would be nice to get to the bottom of it. As for image programs, I think all I have is what ever comes standard with Windows, but I'll double check that this weekend. Currently, I am running Windows 10 Link to comment Share on other sites More sharing options...
Saragani Posted June 11, 2023 Report Share Posted June 11, 2023 @Dave Please download the following images and tell me if it has a transparent background when you add it in UniLogic. These are the images from UniPics after I have removed the watermark from them Link to comment Share on other sites More sharing options...
Saragani Posted June 12, 2023 Report Share Posted June 12, 2023 @Dave After you check those images, then please check the following image, and tell me if it makes a difference. Thanks Link to comment Share on other sites More sharing options...
Dave Posted June 12, 2023 Author Report Share Posted June 12, 2023 Hi Saragani. All 3 images worked fine...transparent background and no watermarks. Link to comment Share on other sites More sharing options...
Saragani Posted June 13, 2023 Report Share Posted June 13, 2023 @Dave This is weird. The first 2 images are the same images that are created when UniLogic removes the watermark from the image. I just ran the code, but instead of using it inside the project, I saved it to disk. I will have to further investigate it. Link to comment Share on other sites More sharing options...
Saragani Posted June 14, 2023 Report Share Posted June 14, 2023 @Dave I have sent you a private message with a tool that may help me understand what's wrong. My current guess is that it's something with the png encoder which removes the opacity on save. Link to comment Share on other sites More sharing options...
Saragani Posted June 14, 2023 Report Share Posted June 14, 2023 Issue sorted. Dave was taking the images from VisiLogic folder (which doesn't have the transparency), rather than from UniLogic UniPics folder. The folder appears in the "Custom Places" shortcut while browsing an image in UniLogic: Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted June 14, 2023 MVP 2023 Report Share Posted June 14, 2023 I've been intrigued by this issue, and glad it's resolved. But as someone who never uses colour images, I need to ask the question.... In Vision, the single pixel method for defining transparency is used. For simplicity of using and applying on every image a user might use, can this be done in Unilogic? Or does the method already exist and has been forgotten in this case? cheers, Aus Link to comment Share on other sites More sharing options...
Saragani Posted June 15, 2023 Report Share Posted June 15, 2023 In UniLogic we use the transparency of the image itself. Png images support alpha channel. It is not just a pixel is transparent or not, it can be half transparent, and there are 256 levels of transparency. In VisiLogic it was done in the single pixel method, since there was no other way (Visual Basic 6 does not support alpha channel, anti-aliasing etc.) Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted June 15, 2023 MVP 2023 Report Share Posted June 15, 2023 Thanks Saragani, I suspected as much but thought it worth an ask. 🙂 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now