Commit Graph

139 Commits

Author SHA1 Message Date
Lovell Fuller 3ad7363104 heifsave: add option to control subsample_mode
Defaults to no subsampling when Q>90 for consistency with jpegsave.

Deprecate VipsForeignJpegSubsample enum, replace with more generic
VipsForeignSubsample.
2021-01-13 10:01:34 +00:00
John Cupitt df3b80fa40 add vipssave_target() 2021-01-02 15:49:32 +00:00
John Cupitt 42af1cec36 add vipsload_source
plus small openslideload_source fixes
2020-12-31 19:47:36 +00:00
John Cupitt babbb086f9 add openslideload_source 2020-12-30 14:14:08 +00:00
John Cupitt 633abe7be8 add missing funcs to public C API
The C API was missing vips_jpegload_source and vips_svgload_source.
Thanks to augustocdias.

See https://github.com/libvips/libvips/issues/1780
2020-08-14 13:36:12 +01:00
John Cupitt d831ad34d5 add ppm load/save to a connection
plus some more tests
2020-06-27 15:23:18 +01:00
John Cupitt 5229061360 fix doc error
Thanks MathemanFlo

see https://github.com/libvips/libvips/issues/1618
2020-04-22 11:32:21 +01:00
John Cupitt 3b57e13452 move heifsave to new target API
and add heifsave_target
2020-03-15 18:17:08 +00:00
John Cupitt 0badb7c603 add heifload_source 2020-03-15 11:45:56 +00:00
John Cupitt 764b196d50 move pdfload on top of source API
and add pdfload_source

see https://github.com/libvips/libvips/issues/1541
2020-03-11 18:15:15 +00:00
John Cupitt 1a0e61510b rewrite matrixsave
uses new target API
2020-02-22 17:55:04 +00:00
John Cupitt ce240b1ca2 revise matrixload for source API 2020-02-22 15:02:12 +00:00
John Cupitt d68e02a3c4 Merge branch 'revise-csvload' 2020-02-21 18:23:13 +00:00
John Cupitt fe47ce12e9 move csvsave to the new target API 2020-02-21 17:57:28 +00:00
John Cupitt 726895b3d1 add vips_csvload_source() 2020-02-21 16:39:40 +00:00
John Cupitt 0a23bf3578 revise formatting, add docs
fix up some formatting from https://github.com/libvips/libvips/pull/1552

plus some other small changes
2020-02-18 17:37:56 +00:00
elad laufer 00bf3269bd - fix comment 2020-02-17 17:13:01 +02:00
elad laufer d2b794ec35 - use a single enum and switch that replaces no_subsample, force_subsample 2020-02-17 11:29:57 +02:00
alon-ne f88dab9ccd
Fix gif dispose handling for DISPOSE_BACKGROUND and DISPOSE_PREVIOUS
- Add 'scratch' field to gif that holds temporary 'scratch buffer' used for rendering frames
- For DISPOSE_BACKGROUND: Set background color to transparent instead of 0
- For DISPOSE_BACKGROUND: Write background pixels into scratch after rendering current frame, so it will be used in next frame
- For DISPOSE_PREVIOUS: Save frames that are not disposed into 'previous' field in gif, when DISPOSE_PREVIOUS is specified start with that previous frame. see http://webreference.com/content/studio/disposal.html
- Add "ANIMEXTS1.0" to Application Extension parser
- Graphic Control Extension parser refactor
- Compare file contents to expected images for animated gifs in foreign tests
2020-02-06 17:36:13 +02:00
John Cupitt acabd2dc08 add gifload_source 2020-01-30 22:15:48 +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 9a3842919a add mmap ppm input 2019-11-15 15:56:28 +00:00
John Cupitt 55024c71ce
Merge branch 'master' into add-stream-object 2019-11-12 14:08:02 +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 f499cefb0e add iiif layout to dzsave 2019-11-09 20:40:39 +00:00
Kleis Auke Wolthuizen 51ac7a6d8c WiP: Add radload stream/buffer
TODO: Does streamib supports non-seekable streams?
(cherry picked from commit bc99b26b4e0326267ffea3b34d5e4a67c7866c1b)
2019-11-08 16:04:54 +00:00
John Cupitt 23663e8a88 add formatted output streams
you can printf() to output streams, implemented radiance stream write as
a test
2019-10-29 17:43:51 +00:00
John Cupitt 72cbaa9ea3 more revision 2019-10-21 15:04:30 +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 ad7d2b796f webp write is stream-based 2019-10-15 16:56:03 +01:00
John Cupitt 98410042ac add webpload stream
webp uses the new VipsStreamInput mmap interface
2019-10-15 15:46:37 +01:00
John Cupitt 55d2ba8a4d start adding png stream save
doesn't pass the test suite yet
2019-10-14 18:32:41 +01:00
John Cupitt 1bdadeed61 add png stream load 2019-10-14 18:03:45 +01:00
John Cupitt 4d3f66fe33 add stdout write
this now works:

	$ vips invert k2.jpg .jpg | vips invert stdin x.jpg

"stdin" means read from stdin, ".jpg" means write to stdout in JPG
format
2019-10-12 14:12:01 +01:00
John Cupitt 442720a0a1 add magic "-" stdin filename
this almost works!

$ vips invert - x.jpg < k2.jpg
2019-10-11 05:38:58 +01:00
John Cupitt 387cafa738 add jpegload_stream 2019-10-10 20:42:39 +01:00
John Cupitt 8b1817ddd0 fix a couple of clang warnings 2019-08-09 15:22:56 +01:00
John Cupitt 52ee3b083f add webp and zstd support to tiffsave
needs some tests still
2019-07-08 10:39:44 +01:00
Lovell Fuller 42f9f78c86 heifsave: expose compression option
improve error messaging, add further suffixes
2019-07-03 13:07:58 +01:00
John Cupitt 080ab87d37 Merge branch 'master' into HEAD 2019-04-11 16:18:39 +01:00
John Cupitt 27195cc92c add vips_foreign_get_suffixes()
Add vips_foreign_get_suffixes(), get an array of all the filename suffixes that
libvips recognises.

See https://github.com/libvips/ruby-vips/issues/186
2019-02-23 13:50:10 +00:00
John Cupitt 62ba86cfd0 add heif buffer save 2019-01-29 17:21:13 +00:00
John Cupitt a833764878 start heifsave 2019-01-29 10:27:00 +00:00
John Cupitt 07e5f30829 add heifload_buffer 2019-01-29 01:48:10 +00:00
John Cupitt 33fd2a48f0 basic load works
no metadata, no options
2019-01-20 11:33:12 +00:00
John Cupitt 8730d8ddf1 add nifti ext save 2018-07-20 18:20:26 +01:00
John Cupitt 6dc6b4f722 add niftiload skeleton 2018-06-29 17:31:17 +01:00
Felix Bünemann d3439f4d49 Fix wrong value for VIPS_FOREIGN_PNG_FILTER_ALL
The value is derived by oring all the filter flags:

    0x08 | 0x10 | 0x20 | 0x40 | 0x80 == 0xf8

The value was also checked against PNG_ALL_FILTERS in png.h.
2018-05-02 21:50:08 +02:00
John Cupitt 6e0e31a534 Merge branch '8.6' into add-canny 2018-03-05 15:21:30 +00:00
John Cupitt 20d840e6da fix a crash with delayed load
If a delayed load failed, it could leave the pipeline only half-set up.
Sebsequent threads could then segv.

Set a load-has-failed flag and test before generate.

See https://github.com/jcupitt/libvips/issues/893
2018-03-05 14:42:09 +00:00