imgIDecoder 编辑
modules/libpr0n/public/imgIDecoder.idl
Scriptable Base class for a decoder that reads an image from an input stream and sends it to an imgILoader object. Inherits from: nsISupports
Last changed in Gecko 1.7This interface is the base class for decoders for specific image formats.
Method overview
void close(); |
void flush(); |
void init(in imgILoad aLoad); |
unsigned long writeFrom(in nsIInputStream inStr, in unsigned long count); |
Methods
close()
Closes the stream.
void close();
Parameters
None.
flush()
Flushes the stream.
void flush();
Parameters
None.
init()
Initializes an image decoder.
void init( in imgILoad aLoad );
Parameters
aLoad
- An
imgILoad
object to receive the decoded image data. This object also implements theimgIDecoderObserver
interface; you shouldQueryInterface()
it to that interface and call its notification methods while handling the decode operation. You should always pass null as the first two parameters of the notification APIs.
writeFrom()
Writes data into the stream from an input stream.
Implementer's note: This method is defined by this interface in order to let the output stream efficiently copy the data from the input stream into its internal buffer (if any). If this method was provided as an external facility, a separatechar *
buffer would need to be used in order to call the output stream's other write()
method.unsigned long writeFrom( in nsIInputStream inStr, in unsigned long count );
Parameters
inStr
- The stream from which to read the encoded image data.
count
- The maximum number of bytes to write to the image.
Return value
The number of bytes actually written to the image, or undefined
if an error occurred.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论