We use a script that allows us to create a simple sprite animation by only accepting the path of a file, frame size and time per frame. Essentially what we do is to load the entire PNG off screen and then fetch its size using .width and .height attributes, perform basic math to determine the number of frames in the sheet and then use the Solar2D API methods to generate and return an animation object.
This works well most of the time but recently we noticed that on smaller device screens like iphone6 etc, the values returned by for the width and height of the PNG file were clamped at 1024. I have checked that our images are well within the maxTextureSize on these devices and cannot quite work out the reason for this.
For all our projects, we use Letterbox scaling so I tried changing that to zoomEven and the other scaling types but the width and height are still incorrectly reported.
Basically, we’re looking for a simple way to get the actual dimensions of a PNG file stored at a location in the resourceDirectory-- any help will be appreciated.