Commit Graph

4384 Commits

Author SHA1 Message Date
Felix Bünemann 836c2339cf Target master branch for Travis CI build badge 2016-06-07 14:12:32 +02:00
Felix Bünemann d7a39668e4 Revert "only run travis on master and stable"
This reverts commit 43e6e5361b.
2016-06-07 14:02:23 +02:00
John Cupitt b90145ca31 free pixel buffers on image close
We were freeing pixel buffers on thread exit. This was convenient, but
meant that main thread buffers were not freed until program exit. As a
result, long-running programs which created main thread buffers would
slowly fill the operation cache with useless junk, forcing everything else out.

This change also frees pixel buffers on image close. This makes the
cache work much better in long-running programs, and can substantially
reduce memory use.

See https://github.com/jcupitt/libvips/issues/466
2016-06-06 13:50:25 +01:00
John Cupitt 55e5732d85 Merge branch 'master' into free-non-worker-buffers 2016-06-06 11:13:24 +01:00
John Cupitt 37131e5834 not working tests 2016-06-06 11:03:31 +01:00
John Cupitt 43e6e5361b only run travis on master and stable
don't run travis for pushes to branches other than master and stable ...
without this, we can't push non-passing changes to any branch without
breaking our travis badge
2016-06-06 07:10:26 +01:00
John Cupitt 3c696d9a18 notes about sharp needs 2016-06-06 06:39:34 +01:00
John Cupitt 15878bffca Revert "free main-thread pixel buffers"
This reverts commit 2a77301033.
2016-06-06 06:38:18 +01:00
Felix Bünemann 2a2790c211 Fix dzsave vips-properties path for non-dz layout
This fixes a duplicate root path for the vips-properties.xml, when
either the zoomify or goolgle layouts are used.

Example: foo/foo/image-properties.xml -> foo/image-properties.xml
2016-06-06 01:27:16 +02:00
John Cupitt 2a77301033 free main-thread pixel buffers
threads keep pixel buffers in thread-private storage, and free these
buffers on thread exit ... this means buffers created by the main thread will
only be freed on program exit!

if your program creates any main-thread buffers, these buffers will
eventually fill the operation cache and force everything else out,
making the cache useless

this patch explicitly frees main-thread pixel buffers on image close
2016-06-05 16:59:07 +01:00
John Cupitt cf56b43ebf notes 2016-06-05 16:34:10 +01:00
John Cupitt 05ef6a5af8 Merge pull request #438 from felixbuenemann/run-python-tests-on-travis
Run python tests on travis and setup build matrix
2016-06-04 11:42:39 +01:00
John Cupitt a647ee36ba Merge pull request #463 from jcupitt/revert-462-better-dzsave-zip64-checks
Revert "[WIP] More accurate dzsave zip size estimation"
2016-06-04 10:44:19 +01:00
John Cupitt 94b39bfe62 Revert "[WIP] More accurate dzsave zip size estimation" 2016-06-04 10:43:51 +01:00
John Cupitt 9c9074dfc0 Merge pull request #462 from felixbuenemann/better-dzsave-zip64-checks
[WIP] More accurate dzsave zip size estimation
2016-06-04 10:35:05 +01:00
Felix Bünemann b1518a0d5d More accurate dzsave zip size estimation
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).
2016-06-04 07:01:38 +02:00
Felix Bünemann 1f9e81309e Add dzsave zip compression support 2016-06-04 02:14:46 +02:00
Felix Bünemann e42ddd7f7c Rename dzsave no_compression to is_zip 2016-06-03 21:37:25 +02:00
John Cupitt 0faf5395b2 conversion to grey16 could lock
a typo could cause infinite recursion during conversion
2016-06-03 16:24:21 +01:00
Felix Bünemann 14a64c7b4c Configure Travis CI matrix build
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)
2016-06-03 00:50:53 +02:00
Felix Bünemann e71c247764 Make sure test_formats.sh exits on errors
This is required to make sure we fail if a vips command fails, eg. due
to a missing fixture.
2016-06-02 23:10:14 +02:00
Felix Bünemann dacca27ac3 Try running python tests in travis ci trusty env 2016-06-02 23:10:14 +02:00
John Cupitt 1bf8e0847f run py tests from "make check"
though they fail on ubuntu 16.04 due to giflib dumbness

magickload is also failing, investigate
2016-06-02 23:10:14 +02:00
Felix Bünemann 8b598d5b77 Run python tests without make install
In order to do this, we need to add some stub gi module init files which
allow us to extend the gi overrides path.
2016-06-02 23:10:14 +02:00
John Cupitt c5a4afbe40 support --strip for tiffsave
stops metadata save
2016-06-02 13:14:15 +01:00
John Cupitt ff8f6364a4 update notes 2016-06-01 16:12:20 +01:00
John Cupitt 916e5b5589 set filename on file read for more types
the new loaders were missing the line to set the output filename, so
`vipsheader fred.pdf` was not displaying the filename correctly
2016-06-01 09:14:01 +01:00
John Cupitt 0012cefc25 improve orientation fetch
we were generating some annoying messages
2016-06-01 08:59:44 +01:00
John Cupitt 7a91eaa583 tiff save converts for jpg in jpg mode
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
2016-05-31 22:04:07 +01:00
John Cupitt 45b6345e7f better stop on sinkdisc fail
we were not always setting stop on allocate fail, could deadlock if (for
example) flush failed
2016-05-31 21:58:01 +01:00
John Cupitt d51911cda8 fix up orientation docs
document the new orientation system

various tiff/jpeg doc fixups too
2016-05-28 11:17:17 +01:00
John Cupitt 93d0d15f88 Merge branch 'master' into add-tiff-orientation 2016-05-27 20:25:41 +01:00
John Cupitt cefc4ce64d all done
seems to all work and pass tests
2016-05-27 20:24:48 +01:00
John Cupitt 2590559e56 basic tests 2016-05-27 20:18:25 +01:00
John Cupitt 0b646ffcc7 oops, filename 2016-05-27 16:59:21 +01:00
John Cupitt f0521d4b5d all done!
a few more tests though
2016-05-27 16:53:25 +01:00
John Cupitt 23f4d9a235 todo notes 2016-05-27 09:56:11 +01:00
John Cupitt 094470c9c1 done, just a few things left
- tif->jpg copy seems to loose tag

- add tests
2016-05-27 09:48:08 +01:00
John Cupitt 073c2fff28 Merge pull request #456 from felixbuenemann/support-older-librsvg2
Support older librsvg2 / Add Travis checks for svgload / gifload
2016-05-27 08:36:37 +01:00
Felix Bünemann fdeb1b3b12 Test gifload in make check and on Travis CI 2016-05-27 01:26:45 +02:00
Felix Bünemann f9dc33c8f2 Test svgload in make check and on Travis CI 2016-05-27 01:26:45 +02:00
Felix Bünemann ffa4f6b720 Lower librsvg version requirement to 2.34
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.
2016-05-27 00:55:32 +02:00
John Cupitt c077be231c Merge pull request #455 from felixbuenemann/fix-bootstrap-echo
Use printf instead of non-portable echo -n in bootstrap.sh
2016-05-26 23:07:09 +01:00
Felix Bünemann 8afa96ff79 Use printf instead of echo -n in bootstrap.sh
The behavior of `echo -n` is not portable and some implementations will
just prtint the literal string "-n".
2016-05-26 23:15:15 +02:00
John Cupitt 5a9f2c787b compiles
needs testing etc.
2016-05-26 14:58:04 +01:00
John Cupitt ac2ce4228b notes 2016-05-26 07:30:29 +01:00
John Cupitt 5f75e5363b radsave_base should be abstract
now we can set suffs on it, but pick the actual saver from the subclass
2016-05-24 11:19:02 +01:00
John Cupitt 50468a07a2 clean up foreign
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
2016-05-24 10:57:02 +01:00
John Cupitt 0cdfc8396c Merge pull request #452 from Sterblue/master
Add unit test for radiance buffer save
2016-05-24 10:56:28 +01:00
Henri Chain 701f4aaf6e close right after write 2016-05-24 11:42:23 +02:00