Commit Graph

21 Commits

Author SHA1 Message Date
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 2be0b97dce switch to g_warning()_/g_info()
we had vips_warn() and vips_info(), but they are a bit crappy ... switch
to g_warning() and g_info() instead

see https://github.com/jcupitt/libvips/issues/544
2017-01-03 15:52:27 +00:00
John Cupitt c90b8be0b8 add tiffsave_buffer
add tests

also some cleanups to foreign include files

see https://github.com/jcupitt/libvips/issues/417
2016-10-15 12:29:14 +01:00
John Cupitt 6368ab0649 add switches to disable rad, analyze and ppm
vips has built-in support for rad, analyze and ppm ... add configure
switches to disable these readers

useful to reduce the attack surface in some applications
2016-03-12 16:48:27 +00:00
John Cupitt 4d18300560 add VIPS_FABS/MAX/MIN/CLIP
macros which use the gcc __builtin_fabs() etc. functions when they can
2016-01-26 12:26:21 +00:00
John Cupitt 07a1903390 use g_assert_not_reached()
we were using g_assert(0) ... g_assert_not_reached() makes the
intention clearer
2016-01-24 13:21:53 +00:00
John Cupitt dbd852211e move bytw swapping out to vips_byteswap()
it was an option to vips_copy(), ugly!
2015-06-05 13:56:26 +01:00
John Cupitt 5cb2239d7d try to support DOS ppm/csv files on linux
swap \r\n for \n in vips__fgetc()
2015-06-04 12:58:30 +01:00
John Cupitt cce90b4fba add pbm save
previously vips could load but not save pbm (one bit) images

fix a few bugs in float load and save as well, and improve one-bit load
2014-11-08 17:40:43 +00:00
John Cupitt 32a8fe117e start working on --disable-deprecated
need to move im_conv() etc to classes to finish this
2014-07-25 18:06:52 +01:00
John Cupitt 362b2db9ab silence some compiler warnings 2014-06-29 10:34:42 +01:00
John Cupitt c85dd26627 oops, better filename set on foreign load
we were setting the filename in the wrong place
2014-06-10 13:46:05 +01:00
John Cupitt 9dea549063 oops savers were not setting filename
when we added all the buffer loaders, we cul dno longer set filename in
VipsForeign, it's now the responsibility of each load class
2014-06-10 11:26:09 +01:00
John Cupitt c81654ad93 fix some clang warnings 2014-01-09 14:26:58 +00:00
John Cupitt 8956ba536b fix some cppcheck warnings 2013-05-01 18:46:15 +01:00
Benjamin Gilbert 8cc76a6ba3 Update address for Free Software Foundation
Also update LGPLv2.1 license text from the copy currently on the GNU
website.
2013-03-07 00:40:19 -05:00
John Cupitt 88c3f7ab7d fix compiler warnings
some compiler warnings appeared in a production build (assert()s
commented out, -Wall, and -O2)

thanks to Dmitry Roshchin for the report
2012-08-14 12:43:54 +01:00
John Cupitt d0ec401a12 hackery to get goi working 2011-12-31 18:22:42 +00:00
John Cupitt a62f5f8832 remove wio_output 2011-12-21 12:08:29 +00:00
John Cupitt 6864739351 move matio read to new system 2011-12-20 10:10:53 +00:00
John Cupitt 70bde4a90d move ppm read/write to new-style 2011-12-20 09:37:07 +00:00