PNG image complexity affects mouse response

edited November 2014 in Android Mode

Hi - I am using Processing, Android mode, on a Nexus 7. I have noticed that when I display png images (generated in advance, and loaded with the requestImage() method) that the most complex image (a gray scale checkerboard, each pixel that is on is surrounded by 4 off pixels) essentially blocks mousePressed() activity. Less complex images (vertical stripes of increasing width) do not exhibit this behavior.

My assumption was that requestImage generated a bitmap (that is the pixel matrix of PImage) and that once the image was rendered, all behaviors would be the same regardless of how complex the image.

Is there something going on behind the scenes with .png images that cause the to be considered vector images of some sort?

Thanks in advance

Joe

Answers

  • Answer ✓

    Moved from Questions about Code because you don't show any code. To Android section, although I am not sure if it is Android related (but probably, unless you can show a sketch reproducing the issue on our computers).

    Basically, I think your assumption is right, once the bitmap image is loaded, whatever its initial format and complexity (except perhaps transparency vs. opaque), it ends in an array of pixels.

    Not too sure about Android itself.

  • Thanks. Still working on this; I believe that the answer lies in the touchscreen implementation of the nexus device itself. Random mousePressed events happen without anything heavier than oxygen and nitrogen bouncing off the touchscreen of the Nexus7. I suspect that the apparent desensing of the touchscreen is a consequence of the image underlying the touchscreen. Just a hunch, but I had to implement a mouseclick routine that timed the duration between mousePressed() and mouseReleased() and called it a click if it was an interval of between 25 and 1000 mSec. Just sensing mouseReleased generated too many random events.

    Thanks for the response.

Sign In or Register to comment.