In Cascades, you can use only the PNG, JPG, and GIF formats to create images. Other image formats are not supported.
An important visual aspect of most applications are its images. Images are represented by the Image class. In Cascades, you have two types of images: images that are assets (packaged with an application) and external images (generated by the app, or coming from other sources). The behavior of these two types and the process for creating them differs.
Typically, you should use image assets for any images that are used to build your UI (for example, backgrounds, icons, borders, and so on). All images (both assets and non-assets) are loaded asynchronously so that they don't block the UI thread. In some cases, this means that images might be displayed a short time after the rest of your UI.
In Cascades, images that are loaded into memory are stored in a texture cache. If your application ever reaches a low-memory state, the application might remove images from the cache that aren't currently visible on the screen. The size and position of these images are maintained in the scene graph to minimize the impact on an application's layout. When those screens become visible again, the application might use an animation effect to display the images that had been removed.
Continue reading the sections below to learn more about the differences between image assets and external images.
Last modified: 2014-09-30