About Loader: Loader will load images as bitmap. How to convert those bitmaps to Pic?

Using loaders to load images, will store images as Bitmap. How can i convert each image (of type Bitmap) to picture (of type Pic).

The e.bitmap is a Bitmap. A Pic() is a Container with a Bitmap in it. We used to just have the Bitmap. We added a Container so that we could lazy load. In other words, make an object that can have an asynchronous bitmap put into it after and still be the same object.

The e.bitmap is read into a ZIM Bitmap directly and not loaded through the ZIM/CreateJS file preload system. There is no way to make it a Pic() but probably no need to. The equivalent would be to make a Container() add the e.bitmap to the container with addTo() and set the container.type = "Pic".

1 Like