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

Parents
  • 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...

Comment
  • 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...

Children