Commit Graph

19 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
Alistair Thomas 0506c49444 Update GObject introspection annotations for libvips/foreign directory 2017-09-26 23:39:06 +01:00
John Cupitt 91e52f3d36 oops 2017-06-28 09:32:30 +01:00
John Cupitt 61d5ba7b58 larger strip size for pdfload
We had 128-pixel high strips for pdfload. This kept mem use very low,
but meant many calls to page_render. For a tall page with an image
background, we could take almost an hour to render a single page as the
background was repeatedly repainted.

Change the strip height to 5000. This will render most pages in a single
call, but still allow huge images.

See https://github.com/jcupitt/libvips/issues/681
2017-06-28 09:16:06 +01:00
John Cupitt fc7f9d4941 fix some load nicknames 2017-03-13 10:20:42 +00:00
John Cupitt 8c84e6cc34 add page-height to pdfload 2016-11-23 22:11:26 +00: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 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 a613841a49 oop various fixes
seems to work now
2016-05-13 09:16:34 +01:00
John Cupitt f18fbe1fa2 add @n option to pdfload
so you can load many pages at once as a tall strip
2016-05-12 14:13:50 +01:00
John Cupitt a4b5608e3b tiny win32 fixes 2016-03-29 10:13:09 +01:00
John Cupitt 95a74cbf28 tiny help polishing 2016-03-25 16:35:28 +00:00
John Cupitt ddd7ab7459 doc fixups 2016-03-25 10:56:59 +00:00
John Cupitt bd985731eb unpremultiply svgload / pdfload
cairo uses premultipled ARGB, we need to undo this for transparency to
work correctly
2016-02-11 09:06:09 +00:00
John Cupitt 9f2da7d0ee small fixes
use 255 for PDF background
2016-02-10 15:19:00 +00:00
John Cupitt a037346093 better cache sizing for pdfload and svgload 2016-02-10 09:20:28 +00:00
John Cupitt 153886d2eb add svgload
load from bubffer is not working though, strange ... it seems to be
generating a 16-biit image?
2016-02-09 11:01:12 +00:00
John Cupitt 5ca90dc2be final polish 2016-02-08 21:40:44 +00:00
John Cupitt 991cc4f88b rename as pdfload 2016-02-08 20:25:03 +00:00