tinted bitmaps

Posted on
  • It may be "well-known" for you - but it wasn't for me, thus:

    if you g.drawImage(...) a bitmap with one bit per pixel (b/w), that image will not be drawn as defined but using the current foreground/background colors!

    This behaviour is documented, but I missed that until today:

    If the image is 1 bit, the graphics foreground/background colours will be used.

    Good to know...

  • :) It can be confusing but it's also very useful! I believe even 2bpp images without a palette are done this way too

  • indeed - that's really useful - but it surprised me. Again, it is documented and, thus, it was my fault not to read the docs properly!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

tinted bitmaps

Posted by Avatar for Andreas_Rozek @Andreas_Rozek