This may be a noob question, but I’ve so far been unable to figure it out: how can one determine the dimensions of an image loaded into the Python pngdec and/or jpegdec decoders in picographics?
Looking at the picographics docs here doesn’t mention any module interfaces for such, but looking at the sources for, say, PNGdec.cpp suggests the underlying code has such things as getWidth() and getHeight() methods define. Similarly the C headers have (private?) vars for iWidth and iHeight. But all my attempts so far to reference any of these from my python code just results in a ‘pngdec object has no attribute’ error. JPEGdec behaves the same.
FWIW I’m running on a Badger2040 which has a 296 x 128 E-Ink display, with the latest stock badger2040 firmware from Pimoroni, which appears to presently be based on Micropython v1.23.0.
Perhaps these are simply not exposed (in python)? Which then brings me to my next (noob?) question - how do I actually determine from the source code (ie github links above) what all actual bindings are exposed in the python modules for such libs as picographics? I know I can look at the README.md docs, but I figured there should be some way to identify what all is exposed from the build source tree, just haven’t been able to identiy where/how… :-\
BTW I already know how big my pics are - I’m explicitly generating them to fit the Badger screen - but I wanted to generalize my program a little to accept smaller image files and center them accordingly; hence the need to determine the dimensions to then know how to adjust the image.decode(x,y) coords appropriately.
Thanks much!