Getting a .jpg to update itself - possible?

Getting a .jpg to update itself - possible?

Author
Discussion

Burty88

Original Poster:

140 posts

209 months

Tuesday 10th August 2010
quotequote all
Hi all,

Curtrently doing something for work involving a Head-up Display and obiously would like the HUD to update when certain actions occur. I want to be able to pull the HUD information from a jpeg (because that's the only format the program supports) and obviously need this jpeg to update itself.

Is there anyway either through using a third party piece of software or even making a script (I have close to zero experience coding) that would cause a .jpeg file to update itself?

zac510

5,546 posts

207 months

Tuesday 10th August 2010
quotequote all
This solution won't exactly load upon detection of change in data but if a time based refresh is fast enough it should be fine.

If you load the jpg into a browser you should be able to put the browser into 'Refresh every...' mode and have it reload itself to the time you have specified. Firefox has an extension for this, Opera has it built in. Chrome probably has an extension too. Don't think IE could do it though.

This assumes the filename of the jpg doesn't change.

TheEnd

15,370 posts

189 months

Tuesday 10th August 2010
quotequote all
You won't be able to get the jpeg to change, but you will be able to rewrite over it with an updated one, keeping the same name, and then you'd need your HUD to refresh itself also.

I guess the HUD would load the jpeg, and store it in a cache and not do anything unless prompted to refresh.

It's be easy enough to get whatever is generating the jpegs just to keep writing updated ones onto the same name.

Maybe you could see if you could emulate the cache, and write directly into that.

Burty88

Original Poster:

140 posts

209 months

Tuesday 10th August 2010
quotequote all
I can get the HUD to refresh itself - it's basically a rediculously high level programming language, so really application specific, but I can get it to unload then reload the jpeg.

All of the codes in the program are in xml, but i don't suppose that really helps as the way the program interprets the xml is native to it.

What would be the best way to do it if it wasn't time based? If it were to be keyboard, or touch activated... I take it it'd need some sort of third party "invisible grid" to be laid over the program window and then update jpegs upon certain parts being touched - unless there's a way of getting a programs inputs to correspond to an process outside of the program???

Thanks for your suggestions so far! biggrin

P.S Just to make this all a bit clearer, the program I'm using is called Metaio Unifeye, it's an Augmented Reality developer suite. Problem is, is that it's quite limiting in what you can and can't do with it, so I'm looking for ways around things they haven't provided.

TonyRPH

12,999 posts

169 months

Tuesday 10th August 2010
quotequote all
Where is the jpg located? Is it on a web server, or just on a local file system?

What operating system is it stored on?


Burty88

Original Poster:

140 posts

209 months

Tuesday 10th August 2010
quotequote all
Local file system

and Win7

rpguk

4,466 posts

285 months

Tuesday 10th August 2010
quotequote all
If you have reloading the JPEG sorted, then surely the important thing is whatever is creating the JPEG?

Perhaps something like ImageMagick?