Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Indexed colors

Henrik �stman
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In the DOS-days, asm mov ax,13h; int 10h; end; would get me into graphicmode 13. Presenting me with 320x200 resolution and 256 beautiful indexed colors. The nice thing about indexed colors was how simple one could animate a picture by just rotating parts of the palette. There seems to be a IndexedColor model in Java, but how close is this to the "old thing"??
Do i get a 8-bit palette or a full 32-bit one? Can i render a image(Sprite) in IndexedColor model on the screen at the same time with other images in other ColorModels, or do they all then have to be indexed?

Rotating the palette in mode 13 was a very cheep operation, is it still in Java? Or is mixing all those colormodels killing all the performance??

Does anyone have some examplecode showing how to access the palette and setting a pixel(putpixel(x,y))? (I just need a few sprites in my game to have indexedcolors)

MANY THANKS! (and sorry for my bad english!)

// Henrik
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic