williamsandonz
williamsandonz

Reputation: 16430

.NET Dynamic Image Generation

I've been thinking about setting up a dynamic image grid similiar to milliondollarhomepage, but 500x500. Users choose their place on grid.

My question is how would you go about drawing the image from the data? I've been thinking the image can be drawn from a array[500][500], each slot storing color for a pixel. So when a user adds a piece in the square, you record position and size and replace that in the array>?

Then each time the image changes you store the total blob in the DB so you have some versioning

What do you guys think?

Upvotes: 0

Views: 132

Answers (1)

Boris Yankov
Boris Yankov

Reputation: 1540

  1. Create empty 500x500 image.
  2. On each addition of new entry, store that entry in database.
  3. Add entry to image.
  4. Save static image as a file.
  5. Serve this image to page visitor.

This way you have both a history of all changes and a fast and static image to show.

Upvotes: 2

Related Questions