This improves the checks on when to abort dzsave due to lack of ZIP64
support in libgsf. ZIP64 is required for archives/files larger than 4GB
and if more than 65535 files need to be stored, which is the more likely
limit to hit when saving zoom images.
* Add check to abort when exceeding the 64k file limit
* Modify size check to account for per file and directory overhead
The previous estimation was ways off, subtracting only 100k for overhead
when the actual overhead would be several megabytes for file counts near
the limit.
Estimation Basis:
Per file overhead: 30B fixed size fields + filename + extras
Central directory overhead: 46B fixed size fields + filename + extras
End of central directory: 22B fixed size fields
ZIP64 specific header sizes are not estimated, because the checks are
only done if zip64 support is lacking.
In order to estimate the variable space for filenames we need to track
the total length of all filenames and double that, because the filename
is stored in both the local file header and the central directory.
Because we don't know how big the blank tile and metadata files will be,
we subtract 64k from the max size and also leave room for up to 3 more
files (blank tile, metadata, vips properties).
The following environments are used:
* Ubuntu Precise (only cli tests are run)
* Ubuntu Trusty (cli and python tests)
* Mac OS X 10.11 / Xcode 7.3 / mozjpeg (cli and python tests)
when jpg compression is on, tiffsave now converts the input image for
jpg save ... previously, it would try to send a tiff-formatted image
(eg. perhaps with an alpha channel, or float data), which would fail
see https://github.com/jcupitt/libvips/issues/449
This is the first version that works properly with gtk3. Lowering the
requirement enables SVG support on older Linux distributions like
Ubuntu Precise LTS or Debian Wheezy.
various cosmetic changes:
- pngsave_buffer now uses Write, not WriteBuf, same change for
radsave_buffer
- move C wrappers out to class defs from foreign.c
- use g_free() not vips_free() for buffer free from low-level savers
- fix var names in some comments
- various style changes for radiance.c