int ImageAdd(char *filename);


Add an image.  Paths to the file named in the filename parameter are relative to your application's Assets folder, or Documents, if the filename starts with "Documents/".


Return Value


Returns an int handle to the loaded image.





Name of the image file to be loaded.  The PNG file format is the only supported image format.


The path to the file named in this parameter must be in the Assets folder where your application resides.  (Typically, your project's Debug or Release folder.  For example, if your project is in C:\DragonFireSDK\, your Assets folder will be C:\DragonFireSDK\Debug\Assets or C:\DragonFireSDK\Release\Assets.)


You may also specify an image file that is in your application's Documents folder by adding "Documents/" in front of the rest of the path.  This is especially useful if your application uses NetSend() to download new images.


NOTE: The file system used by iOS is case sensitive, so be sure to match the case of the file name in your code to that of the file on your computer.




The ImageAdd() function loads the file specified by filename to memory. Use ViewAdd() to make the image visible.




Available in DragonFireSDK 1.0 and later.




Description: This program will display Ball.png at coordinates 0, 0 (upper left corner of screen).


#include "DragonFireSDK.h"


void AppMain()


  int im;

  int vw;


  im = ImageAdd("Images/Ball.png");

  vw = ViewAdd(im, 0, 0);



void AppExit()





void OnTimer()