homepage Welcome to WebmasterWorld Guest from 54.243.13.30
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
Forum Library, Charter, Moderator: open

Site Graphics and Multimedia Design Forum

    
interactively change gif
Xoc




msg:854360
 6:56 am on Apr 18, 2002 (gmt 0)

I have a gif file that is the floorplan of my house. On the server-side, I need a way to modify the gif file so that it shows the current state of the lights. I want a green dot if the light is on, and a red dot if the light off. With maybe a dozen lights on a floor, I can't (don't want to) create every possible combination of gif files to show those states. 2^12 gif files doesn't sound that fun to create. So how can I create a gif file from the floorplan plus the appropriately colored dots on the fly on an IIS server when the page is constructed?

People must do this to construct graphs on the fly, so I should be able to do the same.

 

Rhys




msg:854361
 11:17 am on Apr 18, 2002 (gmt 0)

Hi
If you put the floor plan as a background image, then put the state of each possible light overlaid on that in appropriate table cells with the content of the cell being a green or red dot GIF, according to your data input. The dot GIFs are cell sized or else positioned in the cell and with transparent backgrounds. You can make the floor plan a table background, or slide it under the table with a Z positioned layer.

Xoc




msg:854362
 3:09 pm on Apr 18, 2002 (gmt 0)

Can't do layering. I'm on a PDA with the equivalent of IE 2.0. Nice idea, though. More ideas?

mivox




msg:854363
 5:32 pm on Apr 18, 2002 (gmt 0)

Mmm... With the equivalent of a 2.0 browser? Sounds like it's time to slice some graphics. Create a generic on & off gif to use for all lights, and fit the floorplan slices and light gifs into a table...

Don't know how you'd work the dynamic changing of light gifs from off to on, but a sliced/table graphic layout would allow for it.

NFFC




msg:854364
 6:18 pm on Apr 18, 2002 (gmt 0)

We do something sort of similar with a product we sell, the options have and on and an off state. They are switched according to user input but could just as easily be read from a dB.

See your sticky.

joshie76




msg:854365
 1:09 pm on Apr 19, 2002 (gmt 0)

Mivox's sliced image sounds ideal. You'd process the image source names on the server to reflect your lights state (lounge_on.gif/lounge_off.gif or something like that). This way you'd only have to draw two gifs for each light instead of one for every possible permutation.

mivox




msg:854366
 5:01 pm on Apr 19, 2002 (gmt 0)

Actually, I was thinking even simpler than that, joshie. Just light_on.gif and light_off.gif... Then the floorplan image could be sliced in such a way as to accomodate a little 1px on/off gif at each light fixture location.

jatar_k




msg:854367
 5:08 pm on Apr 19, 2002 (gmt 0)

that sounds like the way to go I've done a lot of stuff like that. It isn't always a lot of fun to cut up the image but once it is done it works seamlessly.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved