Bitmap Resources question

Former Member
Former Member
I am using .png files for my resources and I am wondering what the watch does with the .png before it is displayed. I was thinking of ways to make the color of the watch face elements user selectable and for simple images thought the best way would be to make the graphic clear and the background of the graphic whatever the background color would be (in my case black) I could then draw a box the color of the user selection and draw the image on top allowing the background color to show through the image but be blocked of course by the filled in sections of the image. I tried this and one of the images is draws with single pixel width and when the image is loaded it looks as if the black color is filling in the clear portion. I am guessing this is an artifact of the transformation of the .png file. It appears that if I set the background color of my .png to clear and the actual image is some solid color the transformation works fine and displays as I would expect. Is there anyway to overcome this and make it work? I am guessing it may work fine if the drawing in the image is more than a single pixel wide.
  • Former Member
    Former Member over 10 years ago
    I think I followed you up until the point where you ran into a problem. Would it be possible for you to post some images of the problem you're seeing? The strategy you outlined should work (it's how I would do what you're trying to accomplish).

    I'll try to explain how bitmap resources work a bit without going into an extreme detail. Basically the image is processed pixel by pixel and converted into a binary format that Garmin devices know how to draw. With each pixel we'll match it's color to the color on the device that is a closest match. This includes transparency (if the alpha level of a pixel is low enough it will be considered transparent).