Commit Graph

53 Commits

Author SHA1 Message Date
John Cupitt 14a8c5ad47 add @profile option to pngsave
tiff and jpeg save both have a @profile option, this patch adds one to png as
well, see

https://github.com/jcupitt/libvips/issues/180
2014-09-18 09:38:12 +01:00
John Cupitt 8875e23128 fix a setjmp() loop in pngread
see

https://github.com/jcupitt/libvips/issues/175

stupid setjmp()
2014-09-10 09:05:13 +01:00
John Cupitt e9ce212b62 make out of order read a fatal error
For png and jpg, out of order must always be a fatal error, since you
can't read from a specific y position.

This was a g_assert() before which meant that this test was missing from
production builds. It's now always a fatal error.
2014-09-02 09:37:08 +01:00
John Cupitt 296eb8b54e fix pngload with libpng >=1.6.11
thaks Lovell
2014-08-09 17:14:49 +01:00
John Cupitt ebec31fe4a more careful p->t conversion
When we convert an image from "p" to "t" in vips_image_wio_input(), zap
start/gen/stop callbacks. This makes vips_region_prepare_to() read from
the "t" rather than trying to gen pixels again.
2014-08-03 17:59:25 +01:00
John Cupitt 004c98f296 pngsave interlaced makes a copy of the image
interlaced png is hard to write: you have to make seven passes over the
image to make the whole file. It advertises itself as sequential, it
needs to only ake a single pass. Therefore, it must take a copy in
memory of the image to write.
2014-08-03 09:34:46 +01:00
John Cupitt 6ad65fbb68 png read fixes
- call png_read_end()
- catch errors during header read
- free read mem sooner
2014-06-23 09:49:23 +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 35533a54cf finish reviding the fixed-up image load/save API 2014-06-08 11:16:58 +01:00
John Cupitt 011fd99a1a start fixing up the auto-decode stuff 2014-05-19 14:53:47 +01:00
John Cupitt d0f50febbb added vips_foreign_load_buffer() 2014-04-22 16:27:43 +01:00
John Cupitt 12cf71a6a9 combin copy_fields and demand_hint
We had two API calls, vips_image_copy_fields() and vips_demand_hint().
They are now combined in the single vips_image_pipeline() call.

All operations are now slightly smaller and simpler.
2013-10-22 09:29:40 +01:00
John Cupitt 440b800e0e add a new unbuffered seq mode
things like

	vips copy huge.png x.v

now run with only a small line cache
2013-09-29 11:04:11 +01:00
John Cupitt b7d2f7e3e1 more robust error handling for libpng 2013-07-16 12:20:50 +01:00
John Cupitt dcd2dbb756 vips_pngload_buffer() works
fix a bug in vips_jpegload_buffer() too
2013-06-17 09:41:22 +01:00
John Cupitt 005984226e add png load from buffer
though untested as yet
2013-06-16 22:51:28 +01:00
John Cupitt 0c6da0c330 fix demand hints for shrink
"vips shrink" was broken due to wonky demand hints, thanks Jan
2013-04-08 13:08:24 +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 dd05529db4 fix for build against libpng16
I am sending you lightweight patch against vips to be able build it
also with libpng16.

They no longer #include string.h in png.h See section XII of [1] for
details.

Petr
2013-03-01 18:09:47 +00:00
John Cupitt 89d19262fa remove some debugging code 2013-02-27 09:37:32 +00:00
John Cupitt 8dadd1a377 oop png icc profile write was broken 2013-02-27 08:51:28 +00:00
John Cupitt ac405862ba argh 2013-01-11 14:51:12 +00:00
John Cupitt da0b890e84 argh 2013-01-10 14:46:20 +00:00
John Cupitt 9690bd40e9 better icc profile write for vips2png
tests for icc profile presence before reading, to avoid polluting the
error log
2013-01-09 11:33:13 +00:00
John Cupitt 89065b391a sequential needs a strip size param
strip tiff can only read in strip-sized chunks
2012-08-24 16:06:29 +01:00
John Cupitt 39b05f5172 tuning, sort out demand hints
and disable extract_area seq mode
2012-08-24 12:46:10 +01:00
John Cupitt fa5677abd7 works! 2012-08-23 13:49:21 +01:00
John Cupitt f5f0dda551 experiment with thread stalling 2012-08-21 16:18:25 +01: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 f07fb25ab5 fix write RGBA as JPG
it was saving RGBA as CMYK JPG, with comical results (thanks Tobias)
2012-06-17 22:16:20 +01:00
John Cupitt 2e7f4b2900 sanity-check PNG read line size 2012-03-15 12:53:38 +00:00
John Cupitt 8126d48717 Merge remote-tracking branch 'origin/master' 2012-03-15 11:46:16 +00:00
John Cupitt 671c8da098 better behaviour for malformed PNGs
thanks Nicolas
2012-03-15 09:54:26 +00:00
John Cupitt a16daf0b41 fix compiler warning 2012-03-14 11:56:13 +00:00
John Cupitt 4595413e0d add ICC profile read/write for png 2012-03-13 14:22:13 +00:00
John Cupitt d93f772f1f fix deadlock with generate failing
and better error msg from libpng
2012-02-23 12:42:21 +00:00
John Cupitt 8c6e3738dd fix up ordering issues in seq mode
read order should be guaranteed now, hopefully
2012-02-20 15:03:29 +00:00
John Cupitt fa03bfb4cd tiff reader supports new sequential mode
good speedup for large tiffs

$ time ~/vips-7.26/bin/vips-7.26 vips im_copy wtc.tif x.v
real	0m12.728s
user	0m0.220s
sys	0m1.032s

$ time vips copy wtc.tif[sequential] x.v
real	0m4.328s
user	0m0.584s
sys	0m0.764s

new one was compiled with DEBUG, hence (partly) larger user time
2012-02-18 13:17:21 +00:00
John Cupitt 3dcd3729a0 fix interlaced png read
also remove old sinkmemory
2012-02-17 17:59:09 +00:00
John Cupitt fcf052ab09 new sinkmemory works, more png fixing 2012-02-17 17:12:51 +00:00
John Cupitt f38c94ca65 more sequential improvements
always do everything on first pixel access if there's a @load() method
2012-02-16 16:04:19 +00:00
John Cupitt b6c56e980c work on progressive png support 2012-02-15 17:19:42 +00:00
John Cupitt 7f94fb3597 break vips_sequential() out 2012-02-15 15:47:43 +00:00
John Cupitt 13a6c02c5c Merge remote-tracking branch 'origin/master' 2012-02-15 13:56:10 +00:00
John Cupitt aee2999259 generic sequential read mode
moved sequential read stuff into VipsForeignLoad
2012-02-15 13:55:34 +00:00
John Cupitt 07cf2be29e fix png save 2012-02-14 10:53:39 +00:00
John Cupitt e0f31e3b4a vipsthumbnail knows about :seq mode for png
also im_open() knows about old-style embedded filename options
2012-02-08 13:33:19 +00:00
John Cupitt b52785eef7 add a sequential read mode to pngload
helpful for thumbnailing
2012-02-07 14:30:54 +00:00
John Cupitt 0983b50905 Merge remote-tracking branch 'origin/gobject-introspection' into goi-merge
Conflicts:
	TODO
	libvips/arithmetic/im_recomb.c
	libvips/arithmetic/im_stats.c
	libvips/deprecated/im_measure.c
	libvips/include/vips/header.h
	libvips/include/vips/image.h
	libvips/include/vips/object.h
	libvips/iofuncs/header.c
	libvips/iofuncs/image.c
	libvips/iofuncs/object.c
2011-12-24 17:36:55 +00:00