Brad Fitzpatrick (brad) wrote in fotobilder,
Brad Fitzpatrick

Paletted image templates!

I had this awesome idea ...

Layouts will very often require navigation images, right? Like the stuff at the top of this page.

But layouts will also be easily themeable with S2! (you've read the docs, right?)

So, how do we get images to match the color theme?

Simple... the theme defines the images it wants to use, and the accent colors for those images. The images will have to be GIF or PNG (something paletted) and then the server will generate new versions with the colors they want, just by altering the palette tables.

But, to prevent attacks where people generate 2^32 versions of all resources, we only take a styleid in the URL (/system/pic/09902bag/p294; the 'p' is for palette), and the server finds the colors from that. Further, we only do a color transform if the styleid (global, not per-user) matches the user of either of the system account or the user's own account. (so you can't recolor another user's nav icons into your color's theme.... you'd have to copy them first, or wait until they submitted their theme as a system theme, if they did)

Then, we just redistribute a bunch of stock icons with the fotobilder source.

I figure we'll define a color constant in the core S2 layer for what we map to transparent, and we'll call it $*TRANS_COLOR or something.

So, if anybody wants to start coming up with a ton of 2-5 color navigation items, send 'em in!

  • 302: lj_dev

    In the interests of consolidating all FotoBilder development-related discussion, we're going to be closing down this community. The same…

  • Development stalled?

    Is the development of Fotobilder held? Stalled? I am asking because there is no activity on the community and there is no link to the Fotobilder…

  • (no subject)

    Does FotoBilder works with Apache2? I installed all the required modules on my debian sarge, and when I restart my apache server, it dies horribly…

  • Post a new comment


    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic