Image URL

Ok, her’s an easy one. What is the url to the built-in image folders? I used to use it in FPMI, but it is different in Ignition. I looked all over but couldn’t find a ref to it.

localhost:8088/main/system/images/

For instance:
localhost:8088/main/system/image … 2/add2.png

Thanks.

But I’m having a hard time accessing the images. I need to get them from the gateway, so I wanted to concatenate the gateway address with the image path. I know I had this working in FPMI, but it’s on another PC and I don’t have access to the project right now. Even if I just hard code the url, it doesn’t work (in the code below, the gateway is on the local machine):

address = system.util.getGatewayAddress()
print address
I = javax.imageio.ImageIO.read(open("http://localhost:8088/main/system/images/Builtin/icons/32/add2.png"))

Here is the error text:

I’ve tried typing in 127.0.0.1 instead of localhost, and get the same results. But it works fine if I just point to a local file on the PC, such as “D:\Images\Add2.png”, so there is something going on with the path to the gateway. Ideas?

javax.imageio.ImageIO.read is expecting a URL - try the following:import java address = system.util.getGatewayAddress() print address url = java.net.URL("http://localhost:8088/main/system/images/Builtin/icons/32/add2.png") I = javax.imageio.ImageIO.read(url)

Thanks Al, that was it. What threw me was that something like this works

[quote]
C = javax.imageio.ImageIO.read(open(“D:\Images\add2.png”))[/quote]

and it didn’t occur to me that it needed to be a url to reach another PC (or even the local PC if it was part of the path).