Commit Graph

1699 Commits

Author SHA1 Message Date
John Cupitt
eb6c803481 istiff tests first dir rather than magic number
We were testing for TIFF by checking the magic number at the head of the
file. However, formats like ARW are TIFF-like without being TIFF, and
will not load with tiffload.

Instead, try reading the whole of the first directory. This is enough to
stop tiffload trying to load files where it will simply fail
immediately, and make libvips fall back to eg. imagemagick.

see https://github.com/libvips/libvips/issues/1304
2019-06-07 17:52:13 +01:00
John Cupitt
dc16f1253a fix a memleak in tiff pyr to memory
we were not freeing layers other than the top layer
2019-06-06 10:20:14 +01:00
John Cupitt
5657099223 fix composite for some combinations of blend modes
composite could get mixed up blend modes if:

- many images being composited
- some small and positioned with x/y
- at least one unskippable blend mode

phew!
2019-06-04 15:24:54 +01:00
John Cupitt
bd8a6980f5 more consistent behaviour for multi-page load
Some loaders were setting page-height even when the user was loading a
single page triggering unexpected multi-page behaviour from later
savers.

New rule: only set page-height when loading more than one page.

See https://github.com/libvips/libvips/issues/1318
2019-05-29 10:10:28 +01:00
John Cupitt
02bdb8b96c better error message for "unsupported colorspace"
we just printed the enum number before
2019-05-24 17:42:10 +01:00
John Cupitt
5855321638 improve realpath() compat on older libc
older libc didn't allow a NULL for the second param
2019-05-24 15:24:18 +01:00
John Cupitt
394f9baa5e deprecate webpload @shrink, use @scale instead
We need a fractional scale for thumbnail on webp to work well. @shrink
still works, but @scale overrides it.
2019-04-30 18:29:16 +01:00
John Cupitt
3245dd301b Merge branch 'master' into szi-associated 2019-04-25 17:25:32 +01:00
John Cupitt
0102a10b49 seems to work 2019-04-24 17:04:31 +01:00
John Cupitt
27aae32ff6 oops 2019-04-22 11:34:45 +01:00
John Cupitt
c98da89ac9 Merge branch '8.7' 2019-04-19 12:47:35 +01:00
John Cupitt
bae484ba2c remove old c++ and py interfaces
Instead, use the new(er) vips8 C++ interface, and the new(er) python
interface in pypi.

https://pypi.org/project/pyvips
2019-04-12 16:27:28 +01:00
John Cupitt
080ab87d37 Merge branch 'master' into HEAD 2019-04-11 16:18:39 +01:00
John Cupitt
91d0e7e3d0 move kill mechanism to public API
the vips_image_set_kill() system was internal. Move it to the public
API.

See eg.:

https://github.com/kleisauke/net-vips/issues/31
2019-04-06 16:53:42 +01:00
John Cupitt
1f100c0c42 better buffer sizing in tiff reader
We were not setting JPEGCOLORMODE_RGB early enough, so buffers could be
undersized in some circumstances.

Thanks omira-sch.
2019-03-31 12:55:30 +01:00
John Cupitt
da15285bf9 add support for justified text
And set xoffset/yoffset to the top line of text output.

https://github.com/libvips/libvips/issues/1258
2019-03-16 11:53:09 +00:00
John Cupitt
a663a1bb1c add vips_region_fetch() etc.
to help ML applications ... they let us generate lots of small rectangular
areas of images very quickly
2019-03-12 16:00:24 +00:00
John Cupitt
a05a2cb52d mild refactoring of threadpool
clean up and simplify after https://github.com/libvips/libvips/pull/1240
2019-02-27 14:23:43 +00:00
John Cupitt
793cbeeaa7 add note abut region_shrink to changes
somehow got dropped
2019-02-24 20:13:18 +00:00
John Cupitt
27195cc92c add vips_foreign_get_suffixes()
Add vips_foreign_get_suffixes(), get an array of all the filename suffixes that
libvips recognises.

See https://github.com/libvips/ruby-vips/issues/186
2019-02-23 13:50:10 +00:00
John Cupitt
1a83605238 Merge branch 'add-heifload' 2019-02-17 17:11:14 +00:00
John Cupitt
044abe7986 fix some tilecache issues too 2019-02-16 15:32:45 +00:00
John Cupitt
bfa1f22520 works!
tuned a bit too
2019-02-14 15:22:51 +00:00
John Cupitt
931b661d2b fix up and test with im6/im7/gm
seems to work! phew
2019-02-07 18:35:51 +00:00
John Cupitt
8d5af9fe8a add xmp/ipct/icc etc. to magickload
ImageMagick supports binary metadata with `ResetImageProfileIterator()`
etc.

Implementing support gives us xmp / ipct / icc support, plus perhaps
some others.
2019-02-04 17:54:57 +00:00
John Cupitt
f23d0fd754 note new option_string param in changelog 2019-02-03 12:27:58 +00:00
John Cupitt
308c85c004 add support for stored heif thumbnails 2019-01-30 16:19:11 +00:00
John Cupitt
cae7838f86 heifsave seems to work 2019-01-29 16:40:34 +00:00
John Cupitt
33fd2a48f0 basic load works
no metadata, no options
2019-01-20 11:33:12 +00:00
John Cupitt
849d24472e revise changelog
had Klies' magickload fix in there twice
2019-01-18 12:52:04 +00:00
John Cupitt
dcba364efa Merge branch 'zero-mem-on-malloc' 2019-01-18 11:31:11 +00:00
John Cupitt
00622428bd zero memory on malloc
to prevent write of uninit memory under some error conditions

thanks Balint
2019-01-18 10:10:43 +00:00
John Cupitt
00982f6297 add changelog notes
and small formatting issues
2019-01-15 09:36:31 +00:00
John Cupitt
bcc76c6edb Merge branch 'master' into tiff-pyr-stop-at-1-pixel 2019-01-12 15:48:17 +00:00
John Cupitt
f768029298 make the savers use profile_load
tiff, jpeg and png save all use profile_load to attach profiles
2019-01-11 06:30:06 +00:00
John Cupitt
28999aa5b6 add vips_profile_load()
and use it in icc_transform
2019-01-10 22:48:21 +00:00
John Cupitt
960324b08a Merge branch 'master' into add-icc-fallbacks 2019-01-10 15:48:37 +00:00
John Cupitt
5bc342b9b2 revise changelog in magickload fix 2019-01-08 09:05:39 +00:00
John Cupitt
a293da4b5a Merge branch '8.7' 2019-01-04 10:36:59 +00:00
John Cupitt
63c6c7ae30 fix small magicksave error
copy-paste fail meant that IM exceptions were not inherited correctly

see 1619c8b1a1 (commitcomment-31838043)
2019-01-04 10:34:30 +00:00
John Cupitt
87062c4a4f Merge branch '8.7' 2019-01-04 09:19:04 +00:00
John Cupitt
1619c8b1a1 fix memleak in magick6load
IM ExceptionInfo were not being freed correctly. This patch
adds a small wrapper function and uses it to allocate and free all IM
exception objects.

Tested with im 6.9 and gm 1.3.

See:

https://github.com/libvips/lua-vips/issues/24

https://github.com/libvips/libvips/issues/1203
2019-01-04 08:38:58 +00:00
John Cupitt
b8a158b69b seems to work
added some more consts as well
2019-01-03 13:34:13 +00:00
John Cupitt
020ff88f6a Merge branch 'master' into dzsave-skip-blanks 2019-01-02 11:00:42 +00:00
John Cupitt
f611845698 Merge branch 'master' into add-CMYK2XYZ 2018-12-31 14:02:51 +00:00
John Cupitt
6c72ca45b7 Merge branch '8.7' 2018-12-29 22:56:58 +00:00
John Cupitt
9d66420ad5 round to nearest in log scale
we were doing round to nearest in linear mode, but not log

see https://github.com/libvips/build-win64-mxe/issues/3
2018-12-29 20:19:38 +00:00
John Cupitt
c5d0ca8300 add cmyk2xyz and back
seems to work, still to do:

- tests
- try:

```
$ vipsthumbnail NordicsLIQUOR-SFBag_300_cmyk.JPG

(vipsthumbnail:7868): VIPS-WARNING **: 16:53:17.166: profile incompatible with image
```

see https://github.com/libvips/libvips/issues/1186
2018-12-27 17:35:35 +00:00
John Cupitt
d35343f817 stop making tiff pyr if axis drops to 1
TIFF pyramids of images with a very extreme aspect raio could see layer
width or height drop to 0 before the image fitted in a single tile. This
change stops pyramid creation when width or height drop to 1.

See https://github.com/libvips/libvips/issues/1188
2018-12-21 14:47:28 +00:00
John Cupitt
51dbf607dd add skip-blanks option to dzsave
Skip-blanks was a feature of google layout. This patch makes it into an
option you can control which defaults on in gm mode.

See https://github.com/libvips/libvips/issues/1185
2018-12-19 14:52:33 +00:00