Complete
over 3 years ago

WERETECH-12559

This is not planned because it would lead to easily triggering watch dog.

Garmin, new API idea: Read a pixel color from bitmap

Hi all,

I would like to ask Garmin & ConnectIQ that support a new API for read a (or more) pixel color from bitmap resource.

I can say it would be a great help for many developper. Manipulation, scale, etc a bitmaps.

Is it a hard way? I think no, because it is just a read from the bitmap color array, or I am wrong.

Thank you!

Peter

  • I have had some success using base64 encoded images to read pixels, but of course this won’t work with images downloaded via makeImageRequest.

  • Yes, definitely!
    Or you can read "binary" data from the built-in images, because there is not other way to do it. (just json text, but it has much more memory required)
    Or simple image color manipulation.

    Yes, I know, it could trigger the watchdog, but I can do it more "step" (e.g. draw 10 pixel every frame) in a BufferedBitmap...

  • An example of a possible use case that would not trigger the watchdog: read a raster image from the web and sample a single pixel that signifies something e.g. weather map storm intensity at specified location.