Png lib is a lua library that is useful for grabbing info from png files directly. This has a main use of automatically grabbing your base images width/height when using display.newImageRect for instance.
It returns the following properties from a png file (it gets the data directly from the png file, it doesn’t load the image using display.newImage first, its pure i/o)
width
height
bitDepth
colorType
filterMethod
interlaceMethod
Sample usage:
pngLib.getPngInfo(“filename.png”, path)
first parameter is the png file you want to get info from, the second parameter is the path. By default it is set to system.ResourceDirectory if no path is passed to the function.
Download it from the link below, sample is included and usage instructions
http://www.infuseddreams.com/apps/pngLib.zip [import]uid: 84637 topic_id: 26389 reply_id: 326389[/import]
[import]uid: 119420 topic_id: 26389 reply_id: 107013[/import]
[import]uid: 8303 topic_id: 26389 reply_id: 107355[/import]