adding a background image

Post any questions, ideas, or topics related to Jython and Python scripting.
Post Reply
User avatar
hproe
Posts: 504
Joined: Sat Nov 27, 2010 3:46 pm

adding a background image

Post by hproe »

Hi -

Is there a method that allows me to add a background image to a panel (Display > Add Backgorund Image from the Toolbar)?

HP
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: adding a background image

Post by ghansham »

Hi HP.
Are you planning to put a jpg/gif/png image in the background?
I am attaching snapshots that show how to set a such an image in panel.

IDV docs give more details.
https://www.unidata.ucar.edu/software/i ... Image.html

Or am I misunderstanding your query.

Ghansham
Attachments
panel_background.jpg
sel_field.jpg
define_bounds.jpg
formula.jpg
field_sel.jpg
select_data.jpg
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: adding a background image

Post by ghansham »

Hi Sir....
the jpg file used is attached.


Ghansham
Attachments
land_shallow_topo_2048.jpg
User avatar
hproe
Posts: 504
Joined: Sat Nov 27, 2010 3:46 pm

Re: adding a background image

Post by hproe »

Sorry Gansham, you misunderstood my request (and I may have not been very clear, either). I am familiar with adding flat image files. My request is for a method that loads a background image from the web (e.g. Blue Marble) in a Jython script.

HP
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: adding a background image

Post by ghansham »

I think this sample script should be the starting point. It adds the image provided by the user as argument.
You can also specify bounding box coordinates. If you dont, it will take default values of (90,-180,-90,180).
Just it is a point to start off.
Attachments
test.py
(437 Bytes) Downloaded 326 times
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: adding a background image

Post by ghansham »

Hi Sir...

I have uploaded the land_shallow_topo_2048.jpg on SSEC ftp server. Just invoke the sent jython script as:

addImage("ftp://ftp.ssec.wisc.edu/pub/incoming/land_shallow_topo_2048.jpg")

So this script should work for remote as well as local images.


Ghansham
User avatar
hproe
Posts: 504
Joined: Sat Nov 27, 2010 3:46 pm

Re: adding a background image

Post by hproe »

Hi Gansham -

Thanks a lot. Works fine.

HP
User avatar
hproe
Posts: 504
Joined: Sat Nov 27, 2010 3:46 pm

Re: adding a background image

Post by hproe »

Oh, I still have a problem. How can I load images from WMS as background images?

HP
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: adding a background image

Post by ghansham »

Oh I was just expecting you to post this question.
I was just thinking why you are not asking me this question.
I have to dig in to find a script that does it for you.

Give me sometime.

Ghansham
Post Reply