Acknowledged

Crashes calling drawBitmap2()

I am using SDK 8.3.0.

I have a PNG image with white -> gray gradient, with some transparent pixels and am calling drawBitmap2() like this.

            dc.drawBitmap2(cenX, cenY, bitmap, {:tintColor => clr, :transform => transf });

The transformation includes both a linear translation and rotation.

On the following devices in the simulator I get an exception: Source must be native color format

venusq2
venusq2m
fr165
fr165m
instinct3amoled45mm
instinct3amoled50mm
descentg2
instinct crossover amoled

On the Approach S50, an exception doesn't occur but the transparent pixels of the bitmap are converted to black then painted onto the display context.

The bitmap is an RBGA PNG file declared like this:

    <bitmap id="ABC" filename="ABC.png" scaleX="70%" scaleY="70%" scaleRelativeTo="image"
         packingFormat="png"/>

Please fix this.  These bugs have existed ever since these new models were added to the SDK.

Related report: https://forums.garmin.com/developer/connect-iq/i/bug-reports/call-to-drawbitmap2-causes-exception-on-fr165-and-fr165m

  • Adding to a recent issue: After the last firmware update for the Instinct3 (including crossover, 12.21), when using packingFormat="png" and depending on the compiler to turn this into packingFormat="default" the instinct will crash when using drawBitmap2. It has to be explicitly defined as packingFormat="default" now

  • THanks. It sounds contradictory though becuase if automatic palette is false, then you should be specifying a manual palette, and I don't want one.  I want the automatic palette.

  • Add this: automaticPalette="false" 

    <bitmap id="ABC" filename="ABC.png" scaleX="70%" scaleY="70%" scaleRelativeTo="image"
    packingFormat="png" automaticPalette="false" />


    It is mentioned somewhere deep in the forums, but should be added somewhere in the docs...