Commit Graph

5218 Commits

Author SHA1 Message Date
John Cupitt
f1f2a9de55 fix a warning if tiff is disabled 2018-04-10 15:14:09 +01:00
John Cupitt
15abbbe986 set "interlaced" for jpg and png
set "interlaced" for interlaced png and jpg images
2018-04-09 17:14:38 +01:00
John Cupitt
06802e4110 use O_TMPFILE, if available
If O_TNMPFILE is available, use it. This is a linux extension that
creates an unlinked file, so it'll be closed by the system when the last
associated fd is closed.

see https://github.com/jcupitt/libvips/pull/930
2018-04-09 13:27:57 +01:00
John Cupitt
1e647a2af4 Merge branch '8.6' 2018-04-04 17:46:36 +01:00
John Cupitt
915226db21 oop missing a seek 2018-04-04 17:46:14 +01:00
John Cupitt
5f3bcd88ae Merge branch '8.6' 2018-04-04 17:11:16 +01:00
John Cupitt
632bce3c78 reduce stack use for radsave
fixes a crash on very low stack libcs like musl
2018-04-04 16:25:35 +01:00
John Cupitt
aebb8af803 create funcs always make MULTIBAND
Before, they could make B_W for one-band output. This caused problems
with (for example) two black image bandjoined: the second band then
looked like an alpha to hasalpha() and enabled premultiply/unpremultiply
for operations like affine.

Now, it's always MULTIBAND. This is the generic multiband image type, so
you don't get any unexpected alpha handling.
2018-04-04 09:22:57 +01:00
John Cupitt
0dd6b095aa more conservative hasalpha
The result of hasalpha is used to turn on things like
premultiplication, so we should be rather conservative
about when we signal this. We don't want to premultiply
things that should not be premultiplied.

Check Type as well as bands.

See: https://github.com/jcupitt/libvips/issues/918
2018-04-03 14:36:43 +01:00
John Cupitt
e686614f2c drop incompatible profiles from save
libpng has started throwing hard errors if the profile does not match
the image -- this can happen all the time with perofiles inherited from
images that have been processed.

Test profiles before save and drop them (with a warning) if they are
incompatible with the image.
2018-04-01 10:32:48 +01:00
John Cupitt
85615a7fbd gtk-doc annotation update 2018-03-29 09:18:36 +01:00
John Cupitt
1b78f3044d
Merge pull request #914 from janko-m/mark-addalpha-with-out
Add "(out)" to "out" parameter in vips_addalpha()
2018-03-27 08:50:29 +01:00
Janko Marohnić
0e844c8221
Add "(out)" to "out" parameter in vips_addalpha() 2018-03-26 23:30:10 +02:00
John Cupitt
cf36336e8e
Merge pull request #913 from janko-m/remove-mention-of-deprecated-radius
Remove mention of deprecated radius parameter in vips_sharpen()
2018-03-25 19:48:19 +01:00
Janko Marohnić
10c72c58d5
Remove mention of deprecated radius parameter in vips_sharpen() 2018-03-25 20:30:42 +02:00
John Cupitt
5176b4a17e better header sniffing for small files
vips__get_bytes() used to fail if the file was too small for the
allocated buffer, which was a problem for svg, since files can be extremely
small.

This change makes vips__get_bytes() return the number of bytes read, so
the is_a testers can work on files smaller than the max header size.
2018-03-22 12:08:39 +00:00
John Cupitt
5a1ab5968b move svg_ia_a into the base class
feels a bit more logical
2018-03-22 10:43:01 +00:00
John Cupitt
162f541c17
Merge pull request #905 from lovell/svg-is-a
Add is_a support to SVG file class loader
2018-03-22 09:48:04 +00:00
Lovell Fuller
63cab9bc62 Add is_a support to SVG file class loader 2018-03-21 16:55:55 +00:00
John Cupitt
fc52754c2a add example compile lines to C docs
see https://github.com/jcupitt/libvips/issues/909
2018-03-21 09:21:55 +00:00
John Cupitt
aaac2ad957 more optional mem tracing 2018-03-20 12:40:40 +00:00
John Cupitt
c5bf128e39 add "precision" control to canny 2018-03-18 11:12:06 +00:00
John Cupitt
6d570ef0ff more canny cleanups 2018-03-17 22:42:40 +00:00
John Cupitt
b4181054b2 cleanups ready for merge 2018-03-17 18:13:43 +00:00
John Cupitt
81a7fb92eb oop 2018-03-17 18:12:14 +00:00
John Cupitt
ad13dd2041 add a high-precision path for canny 2018-03-17 18:10:50 +00:00
John Cupitt
3fe9b7abc5 split thresh stuff out of canny 2018-03-16 17:26:06 +00:00
John Cupitt
7328f47333 fix atan2 lut in canny 2018-03-16 16:29:52 +00:00
John Cupitt
ae82877e66 try a LUT for atan2 2018-03-14 17:19:17 +00:00
John Cupitt
754a1e5419 Merge branch 'master' into add-canny 2018-03-14 14:18:39 +00:00
John Cupitt
206f158a77 Merge branch '8.6' 2018-03-12 18:12:56 +00:00
John Cupitt
878c77a035 better handling of some fonts
fonts with very large overlapping edges copuld clip in `text`, see
https://stackoverflow.com/a/49169747/894763
2018-03-12 18:11:25 +00:00
John Cupitt
ca5397e1d3 more reliable magick error message 2018-03-11 21:51:04 +00:00
John Cupitt
08dcf29b10 add vips_rotate()
vips_similarity() was a little hatrd to discover, so add vips_rotate()
as a more obvious name for it
2018-03-10 18:45:39 +00:00
John Cupitt
5834779ac6 Merge branch 'master' into add-canny 2018-03-10 15:13:49 +00:00
John Cupitt
a1418b8f72 docs 2018-03-09 17:08:38 +00:00
John Cupitt
0a05dd4304 Merge branch '8.6' 2018-03-09 16:37:10 +00:00
John Cupitt
29e05dabaf icc_import attaches the input profile if used
icc_import can take a fallback input profile in case the embedded one is
broken or missing. If we use the fallback profile, this change attaches
it to the output image.

This means that icc_import will always output an image with the icc
profile that was used to import it. This helps to make the behaviour of
`thumbnail` more consistent.

See https://github.com/jcupitt/libvips/issues/152
2018-03-08 13:11:54 +00:00
John Cupitt
6e0e31a534 Merge branch '8.6' into add-canny 2018-03-05 15:21:30 +00:00
John Cupitt
6fae79b60d Merge branch '8.6' 2018-03-05 15:09:08 +00:00
John Cupitt
178c2f399a oops, dropped a ! 2018-03-05 15:03:49 +00:00
John Cupitt
20d840e6da fix a crash with delayed load
If a delayed load failed, it could leave the pipeline only half-set up.
Sebsequent threads could then segv.

Set a load-has-failed flag and test before generate.

See https://github.com/jcupitt/libvips/issues/893
2018-03-05 14:42:09 +00:00
John Cupitt
84810a6c5c update notes 2018-03-05 08:21:51 +00:00
John Cupitt
6f3708c814 Merge branch 'master' into add-canny 2018-03-04 18:46:04 +00:00
John Cupitt
7f5b0b94c3 Merge branch '8.6' into add-canny 2018-03-04 18:45:59 +00:00
John Cupitt
881a10380e Merge branch '8.6' 2018-03-04 18:45:51 +00:00
John Cupitt
eefb2dad98 improve rounding in convi intize
We were rounding up with ceil() when intize-ing convolution masks.
However, the vector path has a true range of (1.0, -1.0], so a mask with
1.0 as the max (for example) was actually triggering the overflow detector
and falling back to the C path.

Round up with ceil(x + 1) instead, so 1.0 (for example) will be mapped
to 0.5 and won't overflow.
2018-03-04 18:30:25 +00:00
John Cupitt
bca2418d9a Merge branch 'master' into add-canny 2018-03-04 15:31:19 +00:00
John Cupitt
e7a5a8af4a Merge branch '8.6' 2018-03-04 15:31:08 +00:00
John Cupitt
6cff74b602 vips_image_write() could crash if called twice
two writes in a row could trigger a crash in some circumstances, thanks
@dirceupj

see https://github.com/jcupitt/ruby-vips/issues/156
2018-03-04 15:14:06 +00:00