nsISupports
Last changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5)Implemented by @mozilla.org/image/loader;1
as a service:
var imgILoader = Components.classes["@mozilla.org/image/loader;1"] .getService(Components.interfaces.imgILoader);
imgIRequest loadImage(in nsIURI aURI, in nsIURI aInitialDocumentURL, in nsIURI aReferrerURI, in nsIPrincipal aLoadingPrincipal, in nsILoadGroup aLoadGroup, in imgIDecoderObserver aObserver, in nsISupports aCX, in nsLoadFlags aLoadFlags, in nsISupports cacheKey, in imgIRequest aRequest, in nsIChannelPolicy channelPolicy); |
imgIRequest loadImageWithChannel(in nsIChannel aChannel, in imgIDecoderObserver aObserver, in nsISupports cx, out nsIStreamListener aListener); |
boolean supportImageWithMimeType(in string mimeType); |
Constant | Value | Description |
LOAD_CORS_ANONYMOUS | 1 << 16 | |
LOAD_CORS_USE_CREDENTIALS | 1 << 17 |
Start the load and decode of an image.
imgIRequest loadImage( in nsIURI aURI, in nsIURI aInitialDocumentURL, in nsIURI aReferrerURI, in nsIPrincipal aLoadingPrincipal, in nsILoadGroup aLoadGroup, in imgIDecoderObserver aObserver, in nsISupports aCX, in nsLoadFlags aLoadFlags, in nsISupports cacheKey, in imgIRequest aRequest, in nsIChannelPolicy channelPolicy );
aURI
aInitialDocumentURL
aReferrerURI
aLoadingPrincipal
aLoadGroup
aObserver
null
)aCX
aLoadFlags
cacheKey
aRequest
imgIRequest
object or null
for one to be created for you. libpr0n does NOT keep a strong ref to the observer; this prevents reference cycles. This means that callers of loadImage
should make sure to Cancel() the resulting request before the observer goes away.channelPolicy
Start the load and decode of an image.
libpr0n does NOT keep a strong ref to the observer; this prevents reference cycles. This means that callers of loadImageWithChannel
should make sure to Cancel() the resulting request before the observer goes away.
imgIRequest loadImageWithChannel( in nsIChannel aChannel, in imgIDecoderObserver aObserver, in nsISupports cx, out nsIStreamListener aListener );
aChannel
aObserver
null
)cx
aListener
null
, in which case imagelib has found a cached image and is not interested in the data. aChannel
will be canceled for you in this case.
Checks if a decoder for the an image with the given mime type is available.
boolean supportImageWithMimeType( in string mimeType );
mimeType
true
if a decoder is available, false
otherwise.