function Image(url, encoding)
{
	Resource.call(this, "image", "Image");

	/**
	 * Image width (in pixels), if not available should be set -1.
	 *
	 * Stores the real size of the image not the used to represent it, its obtained from the naturalWidth attribute of the image element.
	 *
	 * @attribute width
	 * @type {number}
	 */
	this.width = -1;

	/**
	 * Image height (in pixels), if not available should be set -1.
	 *
	 * Stores the real size of the image not the used to represent it, its obtained from the naturalHeight attribute of the image element.
	 *
	 * @attribute height
	 * @type {number}
	 */
	this.height = -1;

	if (url !== undefined)
	{
		// ArrayBuffer
		if (url instanceof ArrayBuffer)
		{
			this.loadArrayBufferData(url, encoding);
		}
		// Base64
		else if (Base64Utils.isBase64(url))
		{
			this.encoding = Base64Utils.getFileFormat(url);
			this.format = "base64";
			this.data = url;
		}
		// Blob (Need to be read immediatly might be revoked to clean space).
		else if (url.startsWith("blob"))
		{
			var arraybuffer = FileSystem.readFileArrayBuffer(url, true);
			this.loadArrayBufferData(arraybuffer);
		}
		// URL
		else
		{
			this.encoding = FileSystem.getFileExtension(url);
			this.format = "url";
			this.data = url;
		}
	}
	else
	{
		this.createSolidColor();
	}
}
Image class is used to store image data that is used to create Textures.

Images can be stored in mutiple formats.

Some formats (tga, tiff, etc) are converted to png or jpeg in order to work with the rest of the code.

@class Image
@extends {Resource}
@module Resources
@param {ArrayBuffer | string} url Can be URL to image, ArrayBuffer data or base64 encoded data.
@param {string} encoding Image encoding, required for ArrayBuffer data.