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.
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.
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.
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.
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.