A dimension of 400 largest size x or y should cover all common caching cases for SVG icons and web app elements,
but not caching large vector rasters that would exhaust the cache.
Final solution for #757.
FinishInternal() won't get called if an error has been posted before,
so the libwebp cleanup calls need to be in a different place; like the
destructor.
Too-large images won't use HQ scaling and also won't display at 1:1 zoom
because we simply don't have the surface cache space available for that kind of out-of-scope image.
It will allow the user to save such images to disk and view in specialized software.
If the image already had pre-multiplied alpha, the decoder would
pre-multiply those already pre-multiplied values again when decoding
the alpha plane separately from the main plane.
Prevent fully transparent areas from being black (or whatever the color
values there are) when rendering JXR images with planar alpha before all
data is available.
Prev: Hard cap width = 32k OR height = 32k
New: Hard cap width = 64k OR height = 64k, and image area < 256 Mpix
This will allow decoding of larger images with "strip" aspect ratio (horizontally or vertically).
Can be enabled/disabled at runtime by toggling the 'media.jxr.enabled'
pref (disabled by default).
Two additional prefs are provided for testing purposes:
'media.jxr.autoaccept', and 'media.jxr.advertised_mime_type'
See comments in all.js for information on what these do.
This commit includes the MS OpenTech implementation of the decoder on
the browser side with some fixes applied; see the development in Pale
Moon GitGub issue #105 or my comments in the source code for more
information.