display the contents

Hi!

I just started learning corona sdk.

Is it possible, display the contents of the ‘data’ as the picture?

local path = system.pathForFile( “p1_layer_1.png”, system.ResourceDirectory )

local file = io.open( path, “r” )

local data = file:read( “*a” )

Sure you could loop over the data using the string.byte() api, to get the Hex value of each byte and then output that to your screen.  But given the limited screen realestate, I’m not sure what value would be there for outputting the binary data of an image.

Sure you could loop over the data using the string.byte() api, to get the Hex value of each byte and then output that to your screen.  But given the limited screen realestate, I’m not sure what value would be there for outputting the binary data of an image.