Internal class for loading an image that has been split into an alpha channel image and a RGB only color image.
springroll.ColorAlphaTask
asset
asset
Object
The data properties
color
String
The source path to the color image
alpha
String
The source path to the alpha image
[cache=false]
Boolean
optional
If we should cache the result
[id]
String
optional
Id of asset
[complete]
Function
optional
The event to call when done
[sizes=null]
Object
optional
Define if certain sizes are not supported
mergeAlpha
rbgImage
alphaImage
[canvas]
Pulled from EaselJS's SpriteSheetUtils. Merges the rgb channels of one image with the alpha channel of another. This can be used to combine a compressed JPEG image containing color data with a PNG32 monochromatic image containing alpha data. With certain types of images (those with detail that lend itself to JPEG compression) this can provide significant file size savings versus a single RGBA PNG32. This method is very fast (generally on the order of 1-2 ms to run).
rbgImage
Image
The image (or canvas) containing the RGB channels to use.
alphaImage
Image
The image (or canvas) containing the alpha channel to use.
[canvas]
Canvas
optional
If specified, this canvas will be used and returned. If not, a new canvas will be created.
A canvas with the combined image data. This can be used as a source for a Texture.
complete
Default: null