Open Bug 703913 Opened 13 years ago Updated 2 years ago

Cleanup issues found when images are processed in several small parts.

Categories

(Core :: Graphics: ImageLib, defect)

x86_64
All
defect

Tracking

()

People

(Reporter: bbondy, Unassigned)

Details

Some image formats (BMP and ICO in particular, maybe others) can have some problems when small amounts of data are passed into them at a time.  This is not a new issue, but has always been the case.

This bug is to test with code similar to below and fix the variety of problems found.

> void
> nsICODecoder::WriteInternal(const char* aBuffer, PRUint32 aCount) 
> {
>   const int BLOCK_SIZE = 55;
>   int numBlocks = aCount / BLOCK_SIZE;
>   int partialBlock = aCount % BLOCK_SIZE;
>   for (int i = 0; i < numBlocks; ++i) {
>     WriteInternal2(aBuffer + (BLOCK_SIZE * i), BLOCK_SIZE);
>   }
>   WriteInternal2(aBuffer + (BLOCK_SIZE * numBlocks), partialBlock);
> }
> void
> nsICODecoder::WriteInternal2(const char* aBuffer, PRUint32 aCount)
> {
>... normal WriteInternal code
One example of such a problem is BMP code has always had a problem with BLOCK_SIZE == 55, see Bug 700930.
OS: Windows 7 → All
Joe drew mentioned:
> You'll have to write an HTTP reftest, similar to the one in layout/reftests
> /backgrounds/delay-image-response.sjs, but which sends only part of the 
> image, delays a certain number of seconds, and then sends the rest.
Assignee: netzen → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.