Commit Graph

5230 Commits

Author SHA1 Message Date
John Cupitt 3d696b9c1e Merge branch 'master' into pdfium-experiment 2018-04-11 18:00:33 +01:00
John Cupitt 5b55dd8ed4 Merge branch '8.6' 2018-04-11 09:38:59 +01:00
John Cupitt 24b146790f oop reorder crop to come after cache
or we'll write beyond the buffer end
2018-04-10 15:39:51 +01:00
John Cupitt d1dd41a21f strict round down on jpeg shrink
libjpeg rounds up on shrink-on-load. In some cases this can leave a dark
line along the right and bottom edge, since it only contains (for
example) 1/4 of a pixel of data.

This change adds a crop after jpeg load so that only complete pixels are
output.

See https://github.com/lovell/sharp/issues/1185
2018-04-10 15:18:18 +01:00
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 2a82744a10 working at a basic level
TODO

- more code sharing with pdfload.c, eg.  vips_foreign_load_pdf_is_a_buffer()
  and get_flags etc.
- could share the page layout code too
- make pdf.c with base stuff in?
- what about filename encodings
- test transparency
- new_from_buffer needs doing
2018-04-08 18:04:06 +01:00
John Cupitt f3842dcc4b update cpp example
thanks fangqiao

see https://github.com/jcupitt/libvips/issues/932
2018-04-08 11:44:15 +01:00
John Cupitt 05456125b6 builds, links and mostly runs 2018-04-07 17:36:52 +01:00
John Cupitt 56fe608cfb start adding pdfium load 2018-04-06 09:29:45 +01:00
John Cupitt 83d4ee0b0b update find_pdfium for latest packaging
hey ho ouch
2018-04-05 12:10:43 +01:00
John Cupitt 67916e8ead Merge branch 'master' into pdfium-experiment 2018-04-05 11:17:48 +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 38f459711b detects pdfium correctly
and builds without anything else breaking
2018-03-30 22:17:43 +01:00
John Cupitt 9c2ae52820 start adding pdfium tests
though they fail with link problems
2018-03-30 11:59:57 +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