Public Member Functions

imgITools Interface Reference

import "imgITools.idl";

List of all members.

Public Member Functions

void decodeImageData (in nsIInputStream aStream, in ACString aMimeType, inout imgIContainer aContainer)
 decodeImageData Caller provides an input stream and mimetype.
nsIInputStream encodeImage (in imgIContainer aContainer, in ACString aMimeType)
 encodeImage Caller provides an image container, and the mime type it should be encoded to.
nsIInputStream encodeScaledImage (in imgIContainer aContainer, in ACString aMimeType, in long aWidth, in long aHeight)
 encodeScaledImage Caller provides an image container, and the mime type it should be encoded to.

Member Function Documentation

void imgITools::decodeImageData ( in nsIInputStream  aStream,
in ACString  aMimeType,
inout imgIContainer  aContainer 
)

decodeImageData 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).

Parameters:
aStream An input stream for an encoded image file.
aMimeType Type of image in the stream.
aContainer An imgIContainer holding the decoded image. Specify |null| when calling to have one created, otherwise specify a container to be used. It is an error to pass an already-initialized container as aContainer.
nsIInputStream imgITools::encodeImage ( in imgIContainer  aContainer,
in ACString  aMimeType 
)

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.

Parameters:
aContainer An image container.
aMimeType Type of encoded image desired (eg "image/png").
nsIInputStream imgITools::encodeScaledImage ( in imgIContainer  aContainer,
in ACString  aMimeType,
in long  aWidth,
in long  aHeight 
)

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.

Parameters:
aContainer An image container.
aMimeType Type of encoded image desired (eg "image/png").
aWidth,aHeight The size (in pixels) desired for the resulting image.

The documentation for this interface was generated from the following file: