Commit Graph

36 Commits

Author SHA1 Message Date
Lovell Fuller f9ace1724e
Fix a couple of typos in help messages (#2814) 2022-05-21 09:47:51 +01:00
Daniel Löbl 7f8e059dc6
webpsave: add parameter for mixed encoding (#2810)
* webpsave: add mixed parameter

* update changelog

* update webpsave documentation
2022-05-20 18:47:18 +01:00
John Cupitt 460a19b78e revise arg names
use _ everywhere (we have a few uses of - as a separator)
2022-05-07 14:50:05 +01:00
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 8082063607 rename webp reduction-effort as effort
though effort still works
2021-07-30 11:07:43 +01:00
John Cupitt fcaba0e6ba add @profile to webpsave
small tiffsave fixes too
2020-07-18 14:49:37 +01:00
John Cupitt 63d54e5df2 final code cleanups after stream -> source rename 2019-12-30 14:23:51 +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 1e2ca2e0bf fix refleak in webpsave_buffer
And add teardown to the test-suite so we can spot refleaks more easily.
2019-12-21 05:13:54 +00:00
Tomáš Szabo 982e323c71
docs: replace `gif-loop` with `loop` 2019-12-17 16:28:04 +01: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 53f73881f7 rename streamo constructors
Was vips_streamo_new_from_filename(), renamed as
vips_streamo_new_to_filename(). Same for descriptor and memory.
2019-11-07 16:20:12 +00:00
John Cupitt ee3270f8e9 more refactoring 2019-10-22 11:08:54 +01:00
John Cupitt ad7d2b796f webp write is stream-based 2019-10-15 16:56:03 +01:00
John Cupitt 98f3bf78a5 fix doc spelling of "optimise" 2019-08-06 14:46:43 +01:00
Tomáš Szabo ae50136845
feat: support frame delays 2019-06-21 15:06:22 +02:00
John Cupitt 00982f6297 add changelog notes
and small formatting issues
2019-01-15 09:36:31 +00:00
Lovell Fuller d134e05395 Expose libwebp reduction_effort parameter 2019-01-14 19:55:52 +00:00
John Cupitt e7cf88cf99 note delay and loop in webpsave docs 2018-11-28 07:17:02 +00:00
John Cupitt 8edc2c3f22 add webp anim write options 2018-11-06 17:20:35 +00:00
Alistair Thomas 0506c49444 Update GObject introspection annotations for libvips/foreign directory 2017-09-26 23:39:06 +01:00
John Cupitt d5934d606a polishing 2016-11-08 14:42:54 +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 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
Felix Bünemann 3b7242f743 Fix webpsave alpha_q default value 2016-05-09 13:08:11 +02:00
Felix Bünemann 0a25f6efca Add alpha_q(uality) webpsave option, fix Q init
This allows to control the fidelity of the alpha channel by allowing
webp to reduce the number of palette entries from 256 at alpha_q=100
to 2 at alpha_q=0. This is most useful with cutout pictures where
something like alpha_q=30 or around 8 levels is usually sufficient
for smooth outlines.

For some reason webp->Q was intiailized to 80 even though the Q option
and libwebp use 75 by default. This was never used, so it's just to
avoid confusion about what default is used.
2016-04-24 18:18:40 +02:00
Felix Bünemann c107066c4e Add webpsave near_lossless support, fix Q range
The near_lossless option allows to enable preprocessing for the lossless
mode. This is a boolean instead of an int, because the amount of
preprocessing is controlled using the Q factor parameter which is
otherwise unused in lossless mode. This allows to re-use the quality
setting in existing tools.
2016-04-23 02:00:32 +02:00
Felix Bünemann 58a2616f77 New webpsave option smart_subsample
This enables a high quality RGB to YUV converter in libwebp which
greatly improves the quality of fine details by reducing color bleeding
caused by the 4:2:0 chroma subsampling. This is slower and causes
slightly larger files. See WebPPictureSmartARGBToYUVA in libwebp.
2016-04-23 01:20:41 +02:00
Felix Bünemann f834ea39f6 Add lossy compression "preset" option to webpsave
This allows to tune the lossy webp encoder for certain types of images.
2016-04-22 23:57:07 +02:00
John Cupitt 01025328da fix some cppcheck warnings
try:

$ cppcheck -f --enable=warning,performance,portability -j4 . 2> err.txt

there are still some left, see:

see https://github.com/jcupitt/libvips/issues/331
2015-09-28 22:01:15 +01:00
John Cupitt a5a3b062fc support saving 1 and 2 band images to webp
see https://github.com/jcupitt/libvips/issues/267

libwebp does not supportG and GA images

make a new SAVEABLE type for savers which only do RGB and RGBA
2015-04-17 16:59:28 +01:00
John Cupitt 4793c69bba turn VipsBlob into a proper type
with a .get() method we call call from Python
2014-09-02 21:59:11 +01:00
John Cupitt 5baf0dfdcd small fixes for buffer save 2014-04-23 09:26:44 +01:00
John Cupitt 3d14709bdb support webp lossless encoding 2013-08-06 21:56:31 +01:00
John Cupitt e9afbe59e2 added webpsave boilerplate 2013-08-06 16:18:30 +01:00