Many art assets are used in Corona applications images. You will notice that bitmap image objects are a type of display objects.
Using display.newImage(filename [, baseDirectory] [, left, top])
, an image object is returned. The image data is loaded from a filename you specified for your image and looks in system.ResourceDirectory
for that file. The acceptable types of image files that are supported are .png
(PNG-24 or higher only) and .jpg
files. Avoid high .jpg
compression as it may take longer to load on a device. The.png
files have better quality than the .jpg
files and are used to display transparent images. The .jpg
files do not save transparent images.
The default behavior of display.newImage()
is to autoscale large images. This is to conserve texture memory. However, there are times when you do not want to have images autoscaled, and there is an optional Boolean flag in the parameter list to control this manually.