Jump to content

Image Backgrounds


Dave

Recommended Posts

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

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?

 

image.png

Link to comment
Share on other sites

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

@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

"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.

image.png.c36de11c9b68dc25b09481588c35530d.png

Link to comment
Share on other sites

@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

  • MVP 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

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

  • MVP 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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...