From MozillaWiki
Jump to: navigation, search

Generally the image support of Mozilla should be aimed at:

  • Supporting open standards: fully compliant and no proprietary extensions
  • Optimized for image loading, decoding and displaying: one of the core requirements of an internet browser
  • Minimal memory impact, allowing for small device support


Need to add APIs for encoding images. See Mozilla2:Image_Encoding.


We should try to add Apple's ColorSync support to the image decoders on Mac and Windows (see bug 16769). Many who work with digital media come across images with embedded color profiles and so the images look incorrect in Mozilla. Safari displays them correctly.


See for comments regarding native support.

JPEG2000: I have found an extension for mozilla and firefox that lets you view JPEG2000 pictures. I'll post it for those you haven't found it yet, as long as the site's maintainer can handle the extra traffic and those folks here are ok with a little adverstisement on this site. It lead me to think that we should add the ability to view this file format in the standard dist, if it isn't much of a hassle.

Isn't that illegal? JPEG2000 is heavily patented IIRC. Unless somebody's going to buy off the rights holders. And I didn't think had THAT sort of money. Anyway nobody uses JPEG2000, for this exact reason.

Why not just read the JPEG2000 FAQ on patents instead of FUD-ing?

All known patents on the baseline part (Part 1) of JPEG2000 seems to be fee-free.

Only in the case of very large images, which could not processed in memory, there exists a patent case. The patent case was finally lost by thy patentholder Lizardtech against Earth Resource Mapping.

  • has installable XPI bundles for the render-jp2 extension, which gives Firefox the ability to display JPEG 2000 images inline
  • Apple's QuickTime plug-in provides JPEG 2000 support.


The current GIF handling can be further improved, by fixing current 'bugs':

  • Improve memory usage and performance of the decoder (see bug 274391).
  • Optimize memory usage for 8-bit (and less) images (see bug 143046).
  • Reduce source and object code size: Move GIF2.cpp into nsGIFDecoder2 (see bug 196295)
  • GIF Decoder: replace gathering buffer with dynamic malloc to fixed 256 bytes hold (see bug 285872)

These were all fixed in 2007 or earlier.


  • Optimize for animated images. Currently all the frames are decoded, stored as 24-bit images, and all kept in the memory cache - this could be improved on by keeping the LZW compressed frames and only decode into 8-bit or 24-bit when required.


There is a long-standing bug for putting MNG image support back into default builds; it's still objected to by the relevant drivers.


The next step in animated images is full video support. Is built in support for video formats a requirement for a browser?

  • Most possibly no, it should be kept separate module to enable updates to support new formats not only with full browser update.
  • Should there be support for video-specific tags? <img DynSrc=...

Example.jpg Media:Example.mp3