Thanks Altaz - that's what I ended up doing with some help from Chat GPT...
ESPN INC.
Original Message:
Sent: 03-07-2024 10:12
From: Altaz Daruwala
Subject: Display Image(s) in Panel
Hi Brian,
Also, a better way to trim the 'file:/' part of the directory would be using the substr() method. You can use it as follows:
var trimmedDir = currentDir.substr(6);
ogscript.debug(trimmedDir);
Hope this helps.
Best Regards,
------------------------------
Altaz Daruwala
Ross Video
Original Message:
Sent: 03-06-2024 12:48
From: Altaz Daruwala
Subject: Display Image(s) in Panel
Hi Brian,
To trim the file:/ part of the directory you can use the replace function to replace file:/ part of the directory with an empty string. You can find the example below:
var trimmedDir = currentDir.replace(/^file:\//, '');
ogscript.debug(trimmedDir);
Hope it helps.
Best Regards,
------------------------------
Altaz Daruwala
Ross Video
Original Message:
Sent: 03-04-2024 13:51
From: Brian Bell
Subject: Display Image(s) in Panel
Is there a method I can use that will remove the file:/ portion of the filename ?

------------------------------
Brian Bell
Senior Real-Time Developer
ESPN INC.
Charlotte United States
Original Message:
Sent: 02-29-2024 11:34
From: Altaz Daruwala
Subject: Display Image(s) in Panel
Hi Brian,
To set a style to the preview of the image, you can use ogscript.setStyle() function.
An example of using that function could be ogscript.setStyle('ImagePreview', 'bg-u:' + imageUrl);
The above snippet sets the background of the label 'ImagePreview' to the selected image.
For your reference, I have also attached a grid panel below that does exactly what you are looking for.
Hope it helps.
Best Regards,
------------------------------
Altaz Daruwala
Ross Video
Original Message:
Sent: 02-27-2024 09:38
From: Brian Bell
Subject: Display Image(s) in Panel
I would like to display a sponsor (PNG) image in my panel. I have a file picker parameter and I can see the file path of the image. I was hoping that once I selected an image, I could use the setStyle command to change the background image of a Dropspot area (or something else) to display this PNG file.
------------------------------
Brian Bell
Senior Real-Time Developer
ESPN INC.
Charlotte United States
------------------------------