Commit Graph

30 Commits

Author SHA1 Message Date
Kleis Auke Wolthuizen 0337c09700
Cleanup gettext handling (#2695)
Use GLib's i18n support instead of copying and pasting that
logic into its own header. This deprecates the vips/intl.h
header in favour of glib/gi18n.h.
2022-02-27 15:27:28 +00:00
John Cupitt 0c70f3dc7d
add fail-on : better control over loader error handling (#2360)
Instead of a simple fail/don't-fail boolean switch, add fail-on, an enum which sets the sensitivity of loaders to errors. 

There's a new sensitivity level which tries to detect truncated images, but ignores other types of error.
2021-10-31 14:13:18 +00:00
John Cupitt dc29f8dde6 add subifd select to tiff load 2020-05-28 12:40:31 +01:00
John Cupitt 252996e3ff make check passes after stream -> source rename 2019-12-30 12:48:20 +00:00
John Cupitt 4c5873809f experiment with renaming stream
rename as VipsConnection, VipsSource, VipsTarget etc.

see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619

renamed with this script:

```

set -e

edit() {
        sed -i -E "$1" rename
}

for i in $*; do
        cp $i rename

        edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g
        edit s/VIPS_STREAMO/VIPS_TARGET/g
        edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g
        edit s/VIPS_STREAMI/VIPS_SOURCE/g
        edit s/VIPS_STREAM/VIPS_CONNECTION/g

        edit s/vips_streamou/vips_target_custom/g
        edit s/vips_streamo/vips_target/g
        edit s/vips_streamiu/vips_source_custom/g
        edit s/vips_streami/vips_source/g
        edit s/vips_stream/vips_connection/g

        edit s/VipsStreamou/VipsTargetCustom/g
        edit s/VipsStreamo/VipsTarget/g
        edit s/VipsStreamiu/VipsSourceCustom/g
        edit s/VipsStreami/VipsSource/g
        edit s/VipsStream/VipsConnection/g

        # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM
        edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g"
        edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g"
        edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g"
        edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g"
        edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g"

        edit s/streamou/target_custom/g
        edit s/streamo/target/g
        edit s/streamiu/source_custom/g
        edit s/streami/source/g

        # various identifiers which also change
        edit s/is_a_stream/is_a_source/g
        edit s/find_load_stream/find_load_source/g
        edit s/find_save_stream/find_save_target/g
        edit s/new_from_stream/new_from_source/g
        edit s/write_to_stream/write_to_target/g
        edit s/vips_thumbnail_stream/vips_thumbnail_source/g

        # eg. vips_webpload_stream
        edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g"

        # eg. vips_webpsave_stream
        edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g"

        mv rename $i
done
```
2019-12-29 21:40:21 +00:00
John Cupitt 562da3e5ab rename new_from_filename as new_from_file
So VipsStreami matches VipsImage. Same for new_to_filename.
2019-11-22 17:13:20 +00:00
John Cupitt f5a4f41edf rename VipsStream* variables
The convention is now:

	VipStreami *streami;

We had `input` in many places, a left-over from the old VipStreamInput
name.
2019-11-11 09:09:34 +00:00
John Cupitt ee3270f8e9 more refactoring 2019-10-22 11:08:54 +01:00
John Cupitt 226819b8a8 move tiffload to streams
test_descriptors seems to fail now though, odd
2019-10-17 10:58:56 +01:00
John Cupitt b085908558 remove vips7 stuff from API
You must now include vips7 support explicitly with

	#include <vips/vips7compat.h>

in your code just after including `vips.h`.

The old vips7 names, such as `Rect`, were starting to cause problems
with other packages like opencv.
2018-05-16 15:08:21 +01:00
John Cupitt f1f2a9de55 fix a warning if tiff is disabled 2018-04-10 15:14:09 +01:00
John Cupitt 362c7efdfc argh reapply seq removal 2017-03-06 11:55:38 +00:00
John Cupitt 98f5421c10 Revert "remove readbehind"
This reverts commit cb83918a3f.
2017-02-27 10:24:56 +00:00
John Cupitt cb83918a3f remove readbehind 2017-02-21 17:14:33 +00:00
John Cupitt 3ef6a4695a start adding read many page support
but it's not easy ... we'll need to be very strict about every page
being identical if we want to share readers
2016-11-15 10:07:09 +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 5a9f2c787b compiles
needs testing etc.
2016-05-26 14:58:04 +01:00
John Cupitt 2d172f44c3 fix a compiler warning 2014-11-06 13:12:43 +00:00
John Cupitt 54dcea8c3d fix some clang warnings 2013-11-21 17:43:28 +00: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
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 c1dcc3e509 fix a compile fail if no libtiff
compilation failed if libtiff-dev was not found, thanks Martin
2012-09-28 13:30:28 +01:00
John Cupitt 133ee84794 fix --without-magick etc.
the vips7 compat readers like im_exr2vips() were not guarded with ifdefs
in case their read library was missing
2012-07-20 17:18:49 +01:00
John Cupitt a71fe51d2d support "rs" mode in im_open()
vips7 compat mode now supports "rs" mode --- sequential read

ruby-vips uses this to get :sequetial=>true working
2012-07-20 13:07:49 +01:00
John Cupitt 501fabccbe improvements to tiff/png load in vips7
same as we did for jpg

some work on pyramid save as well
2012-07-12 14:50:56 +01:00
John Cupitt 25ad2b7a53 turn off seq mode in vips7
the new sequential mode readers for tiff/jpg/png were not working well
from the vips7 command-line: they either decompressed twice, or handed
over a sequential mode image

it should now work as well as it did pre-seq.
2012-07-12 09:05:14 +01:00
John Cupitt 2332e0bfc3 move the vips7 loaders away from VipsForeign
the vips7 loaders were a thin layer over the new VipsForeign system

however! VipsForeign does various "useful" things, like open via disc,
and this resulted in stuff like

	vips im_jpeg2vips huge.jpg x.v

decompressing to a temp file before copying to x.v

im_jpeg2vips() and friends now call the low-level loaders directly and
avoid the extra mechanisms in VipsForeign

"nip2 huge.jpg" was loading twice as well, for the same reason
2012-07-10 14:38:38 +01:00
John Cupitt 8e3faff59b oops missing init 2012-07-02 14:52:34 +01:00
John Cupitt 3694a2edc5 add sequential mode to vips7
the tiff and jpg readers let you give :seq as well
2012-06-24 09:44:50 +01:00
John Cupitt 14734596a1 move VipsFormat to deprecated 2011-12-20 15:29:33 +00:00