Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Create a wrapper around a scripted notification observer (ordinarily imgINotificationObserver cannot be implemented from scripts).
The scripted observer to wrap
decodeImageAsync See decodeImage. The main difference between this method and decodeImage is that here the operation is done async on a thread from the decode pool. When the operation is completed, the callback is executed with the result.
An input stream for an encoded image file.
Type of image in the stream.
The callback is executed when the imgContainer is fully created.
This eventTarget is used to execute aCallback
decodeImageFromArrayBuffer Caller provides an ArrayBuffer and a mimetype. We read from the stream and decompress it (according to the specified mime type) and return the resulting imgIContainer.
An ArrayBuffer.
Type of image in the stream.
decodeImageFromBuffer Caller provides an buffer, a buffer size and a mimetype. We read from the stream and decompress it (according to the specified mime type) and return the resulting imgIContainer.
Data in memory.
Buffer size.
Type of image in the stream.
decodeImageFromChannelAsync See decodeImage. The main difference between this method and decodeImage is that here the operation is done async on a thread from the decode pool. When the operation is completed, the callback is executed with the result.
The original URI of the image
Channel to the image to be decoded.
The callback is executed when the imgContainer is fully created.
Optional observer for the decoded image, the caller should make sure the observer is kept alive as long as necessary, as ImageLib does not keep a strong reference to the observer.
encodeCroppedImage Caller provides an image container, and the mime type it should be encoded to. We return an input stream for the encoded image data. The encoded image is cropped to the specified dimensions.
The given offset and size must not exceed the image bounds.
An image container.
Type of encoded image desired (eg "image/png").
Encoder-specific output options.
encodeImage Caller provides an image container, and the mime type it should be encoded to. We return an input stream for the encoded image data.
An image container.
Type of encoded image desired (eg "image/png").
Encoder-specific output options.
encodeScaledImage Caller provides an image container, and the mime type it should be encoded to. We return an input stream for the encoded image data. The encoded image is scaled to the specified dimensions.
An image container.
Type of encoded image desired (eg "image/png").
Encoder-specific output options.
getImgLoaderForDocument Retrieve an image cache that reflects the privacy status of the given document.
A document. Null is allowed, but must only be passed when there is no way to obtain a relevant document for the current context in which a cache is desired.
Generated using TypeDoc
Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.
Returns
The resulting reference count.