imgITools
| IID: | c395d8f1-c616-4a1b-adfd-747b4b1b2cbe |
| Inherits From: | nsISupports |
This interface is intended to be used as an instance. To create an object implementing this interface:
var obj = Components.classes["@mozilla.org/image/tools;1"].
createInstance(Components.interfaces.imgITools);This interface is implemented by the following components:
Methods
void decodeImageData ( nsIInputStream stream , ACString mimeType , inout imgIContainer container )
nsIInputStream encodeImage ( imgIContainer container , ACString mimeType )
nsIInputStream encodeScaledImage ( imgIContainer container , ACString mimeType , PRInt32 width , PRInt32 height )
void decodeImageData ( nsIInputStream stream , ACString mimeType , inout imgIContainer container )
Caller provides an input stream and mimetype. We read from the stream and decompress it (according to the specified mime type) and return the resulting imgIContainer. (If the caller already has a container, it can be provided as input to be reused).
- Arguments:
- stream: An input stream for an encoded image file.
- mimeType: Type of image in the stream.
- container: An imgIContainer holding the decoded image. Specify |null| when calling to have one created, otherwise specify a container to be reused.
nsIInputStream encodeImage ( imgIContainer container , ACString mimeType )
Caller provides an image container, and the mime type it should be encoded to. We return an input stream for the encoded image data.
- Arguments:
- container: An image container.
- mimeType: Type of encoded image desired (eg "image/png").
nsIInputStream encodeScaledImage ( imgIContainer container , ACString mimeType , PRInt32 width , PRInt32 height )
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.
- Arguments:
- container: An image container.
- mimeType: Type of encoded image desired (eg "image/png").
- width: , height The size (in pixels) desired for the resulting image.
- height
Reference documentation is generated from Mozilla's source.
