569
edits
Line 4: | Line 4: | ||
Something like: | Something like: | ||
interface imgIEncoder : | interface imgIEncoder : nsIInputStream | ||
{ | { | ||
/* input image data | /* input image data | ||
Line 10: | Line 10: | ||
* result height | * result height | ||
*/ | */ | ||
void init(in imgIContainer input, | |||
in unsigned long width, in unsigned long height); | |||
}; | }; | ||
=== Scaling === | === Scaling === | ||
Line 22: | Line 20: | ||
A reader should get the bytes requested, if not greater than length of encoded image, and it's up to the encoder to buffer more if it encodes more bytes, reading from the buffer on next read. | A reader should get the bytes requested, if not greater than length of encoded image, and it's up to the encoder to buffer more if it encodes more bytes, reading from the buffer on next read. | ||
This expresses the idea that the encoder is something you read from. | This expresses the idea that the encoder is something you read from. |
edits