From f71aa79352d2387a2c233a659078c5559c667610 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sun, 23 Apr 2017 22:42:06 +0100 Subject: [PATCH 1/3] update docs --- doc/Using-vipsthumbnail.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Using-vipsthumbnail.xml b/doc/Using-vipsthumbnail.xml index a195f4ba..4d51cf56 100644 --- a/doc/Using-vipsthumbnail.xml +++ b/doc/Using-vipsthumbnail.xml @@ -16,8 +16,8 @@ The thumbnailing functionality is implemented by vips_thumbnail() and vips_thumbnail_buffer() (which thumbnails an image held as a string), see the docs for details. You can use these functions from any language with a libvips binding. For example, from PHP you could write: - -$filename = ...; + +$filename = "image.jpg"; $image = Vips\Image::thumbnail($filename, 200, ["height" => 200]); $image->writeToFile("my-thumbnail.jpg"); From f6ad8465b601d36af127392954eef717ab7ba841 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 24 Apr 2017 17:34:13 +0100 Subject: [PATCH 2/3] add Cite section --- autogen.sh | 2 +- doc/Cite.md | 19 +++++++++++++++++++ doc/Cite.xml | 21 +++++++++++++++++++++ doc/Makefile.am | 1 + doc/libvips-docs.xml.in | 1 + 5 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 doc/Cite.md create mode 100644 doc/Cite.xml diff --git a/autogen.sh b/autogen.sh index 208a1bf2..9055e1c1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -16,7 +16,7 @@ rm -f m4/gtk-doc.m4 rm -f config.* configure depcomp rm -f install-sh intltool-* libtool ltmain.sh missing mkinstalldirs -rm -f stamp-* vipsCC-7.19.pc vips-7.19.spec vips-7.19.pc +rm -f stamp-* rm -f swig/vipsCC/*.cxx rm -f swig/vipsCC/VImage.h rm -f swig/vipsCC/VImage.py python/vipsCC/VError.py python/vipsCC/VMask.py python/vipsCC/Display.py diff --git a/doc/Cite.md b/doc/Cite.md new file mode 100644 index 00000000..724afea3 --- /dev/null +++ b/doc/Cite.md @@ -0,0 +1,19 @@ + + Cite + 3 + libvips + + + + Cite + References to cite for libvips + + +Martinez, K. and Cupitt, J. (2005) [VIPS -- a highly tuned image processing +software architecture](http://eprints.ecs.soton.ac.uk/12371). In Proceedings +of IEEE International Conference on Image Processing 2, pp. 574-577, Genova. + +Cupitt, J. and Martinez, K. (1996) [VIPS: An image processing system +for large images](http://eprints.soton.ac.uk/252227/1/vipsspie96a.pdf), +Proc. SPIE, vol. 2663, pp. 19--28. + diff --git a/doc/Cite.xml b/doc/Cite.xml new file mode 100644 index 00000000..94588c68 --- /dev/null +++ b/doc/Cite.xml @@ -0,0 +1,21 @@ + + + + + + + Cite 3 libvips + + + Cite References to cite for libvips + + + Martinez, K. and Cupitt, J. (2005) VIPS – a highly tuned image processing software architecture. In Proceedings of IEEE International Conference on Image Processing 2, pp. 574-577, Genova. + + + Cupitt, J. and Martinez, K. (1996) VIPS: An image processing system for large images, Proc. SPIE, vol. 2663, pp. 19–28. + + + + diff --git a/doc/Makefile.am b/doc/Makefile.am index 382e4321..60597702 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -147,6 +147,7 @@ markdown_content_files = \ Using-vipsthumbnail.md \ How-it-opens-files.md \ Examples.md \ + Cite.md \ Making-image-pyramids.md # converted to xml in this dir by pandoc diff --git a/doc/libvips-docs.xml.in b/doc/libvips-docs.xml.in index 2eed5775..46bd6a32 100644 --- a/doc/libvips-docs.xml.in +++ b/doc/libvips-docs.xml.in @@ -44,6 +44,7 @@ + From cc380975602715ea760606ca57bea2de51678647 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 26 Apr 2017 10:25:52 +0100 Subject: [PATCH 3/3] better handling of truncated PNG files improve fail support, and bail out sooner see https://github.com/jcupitt/libvips/issues/646 --- ChangeLog | 1 + libvips/foreign/vipspng.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae223c70..b099728a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 23/4/17 started 8.5.5 - doc polishing +- more improvements for tuncated PNG files, thanks juyunsang 23/4/17 started 8.5.4 - don't depend on image width when setting n_lines, thanks kleisauke diff --git a/libvips/foreign/vipspng.c b/libvips/foreign/vipspng.c index df3716bc..df076ff3 100644 --- a/libvips/foreign/vipspng.c +++ b/libvips/foreign/vipspng.c @@ -63,6 +63,8 @@ * - use dbuf for buffer output * 30/3/17 * - better behaviour for truncated png files, thanks Yury + * 26/4/17 + * - better @fail handling with truncated PNGs */ /* @@ -127,8 +129,8 @@ user_error_function( png_structp png_ptr, png_const_charp error_msg ) /* This function must not return or the default error handler will be * invoked. - longjmp( png_jmpbuf( png_ptr ), -1 ); */ + longjmp( png_jmpbuf( png_ptr ), -1 ); } static void @@ -409,7 +411,7 @@ png2vips_header( Read *read, VipsImage *out ) void *profile_copy; #ifdef DEBUG - printf( "png2vips_header: attaching %zd bytes of ICC profile\n", + printf( "png2vips_header: attaching %d bytes of ICC profile\n", proflen ); printf( "png2vips_header: name = \"%s\"\n", name ); #endif /*DEBUG*/ @@ -538,6 +540,11 @@ png2vips_generate( VipsRegion *or, printf( "png2vips_generate: thread %p\n", g_thread_self() ); #endif /*DEBUG*/ + + /* ... except if fail is on, in which case we bail out. + */ + if( read->fail ) + return( -1 ); } read->y_pos += 1;