Commit Graph

227 Commits

Author SHA1 Message Date
Kleis Auke Wolthuizen
bae0342d95
Update C++ binding and function list (#2851)
* Update C++ binding and function list

Also, start with a capital letter in descriptions whenever possible.

* Ensure `dzsave_target` is generated
2022-06-10 14:43:44 +01:00
Kleis Auke Wolthuizen
07edfe37b1
Improve symbol visibility (#2688)
* Improve symbol visibility

* Decorate required internal symbols with VIPS_API

* Remove a couple of stray header decls

* Incorporate review comment

- Ensure symbol visibility is also set on static libraries.
- Prefer to use `cc.has_function_attribute('visibility:hidden')`.

* Don't export internal deprecated symbols

* Move deprecated symbols to vips7compat.h

* `IM_FORMAT_H` -> `VIPS_FORMAT_H`

* Move `vips_window_ref` compat stub to `vips7compat.c`

* Disable deprecation warnings internally

* `vips_image_get_kill` -> `vips_image_iskilled`

* Ensure API compatibility

* Add missing include directives

* Move `vips__init` decl to vips7compat

* Move `vips__get_sizeof_vipsobject` to vips7compat

* Fix introspection build

* Fix 2 introspection warnings

* Ensure compatibility with vipsdisp

/usr/bin/ld: tilesource.o: in function `tile_source_new_from_source':
vipsdisp/tilesource.c:1627: undefined reference to `vips__region_no_ownership'
2022-04-16 10:58:55 +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
257d84108e fix some more introspection warnings 2022-02-15 09:48:01 +00:00
Corentin Noël
02901436d4
Add meson build system (#2637)
Allows to use the Meson build system to build the project.
2022-02-08 15:19:36 +00:00
John Cupitt
ffe574399e oop typo 2020-09-21 10:07:25 +01:00
John Cupitt
54144a8bc5 allow gaussblur sigma 0
meaning no blur (obviosuly)
2020-09-21 09:45:08 +01:00
Kleis Auke Wolthuizen
9246094033 Fix function pointer cast issues
It is undefined behavior in C and C++ to cast a function pointer
to another type and call it that way. This does work in most native
platforms, however, despite it being UB, but in WASM it can fail.

See:
https://emscripten.org/docs/porting/guidelines/function_pointer_issues.html
2020-06-30 13:35:41 +02:00
Kleis Auke Wolthuizen
f6b9f382ec Avoid using unneeded variables 2020-06-18 14:40:29 +02:00
Kleis Auke Wolthuizen
597def2f77 Remove outdated comment 2020-06-18 14:37:54 +02:00
John Cupitt
051be9203f swp int -> GType in some decls
Some linkers complain about these type mismatches. Thanks kloczek.

See https://github.com/libvips/libvips/issues/1604
2020-04-09 12:20:00 +01:00
John Cupitt
686829166d fix some more metadata updates
some more minor cases picked up by the test suite
2019-11-30 12:11:23 +00:00
John Cupitt
1ee54bfa80 Merge branch '8.8' 2019-09-05 12:45:08 +01:00
John Cupitt
a3d2544934 sharpen restores colourspace 2019-08-31 12:30:06 +01:00
John Cupitt
4b5b982711 merge 8.8 2019-08-31 12:29:50 +01:00
John Cupitt
574be4380e revert sharpen restoring the input colourspace
icc_export can make _RGB images, so the input can be outside the set of
supported colourspace transforms.

See 46212e92b1 (r34904985)

bump version too.
2019-08-31 11:29:36 +01:00
John Cupitt
9a5dca1ef8 Merge branch '8.8' 2019-08-28 10:05:12 +01:00
John Cupitt
46212e92b1 fix default sharpen
sharpen with sigma 0.5 was doing nothing, since the new int precision
rules meant that we generated a point-point convolution.

This patch increases the int precision for sharpen, so we now work with
sigma down to 0.5.

Also: restore input colourspace. Previously, the output image was always
LabS (the computation space for sharpen). Now, it transforms back to the
input space. This is more in line with how other operators work.

Thanks 2h4dl for pointing this out.

See https://github.com/libvips/pyvips/issues/123
2019-08-28 09:16:40 +01:00
John Cupitt
834acad825 fix << on signed int warnings
<< on a negative number is undefined behaviour in C, and will trigger
fuzzer warnings.
2019-08-02 05:35:18 +01:00
John Cupitt
4f2112a4e9 fix memleak in canny 2019-03-11 11:35:25 +00:00
Felix Bünemann
2041deb917 Fix convolution vector path posterization
This fixes posterization in the vector path for convolution caused by a
typo in commit eefb2dad98.

The fix was suggested by @jcupitt.
2018-06-13 17:18:55 +02: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
Janko Marohnić
10c72c58d5
Remove mention of deprecated radius parameter in vips_sharpen() 2018-03-25 20:30:42 +02:00
John Cupitt
c5bf128e39 add "precision" control to canny 2018-03-18 11:12:06 +00:00
John Cupitt
6d570ef0ff more canny cleanups 2018-03-17 22:42:40 +00:00
John Cupitt
b4181054b2 cleanups ready for merge 2018-03-17 18:13:43 +00:00
John Cupitt
81a7fb92eb oop 2018-03-17 18:12:14 +00:00
John Cupitt
ad13dd2041 add a high-precision path for canny 2018-03-17 18:10:50 +00:00
John Cupitt
3fe9b7abc5 split thresh stuff out of canny 2018-03-16 17:26:06 +00:00
John Cupitt
7328f47333 fix atan2 lut in canny 2018-03-16 16:29:52 +00:00
John Cupitt
ae82877e66 try a LUT for atan2 2018-03-14 17:19:17 +00:00
John Cupitt
84810a6c5c update notes 2018-03-05 08:21:51 +00:00
John Cupitt
7f5b0b94c3 Merge branch '8.6' into add-canny 2018-03-04 18:45:59 +00:00
John Cupitt
eefb2dad98 improve rounding in convi intize
We were rounding up with ceil() when intize-ing convolution masks.
However, the vector path has a true range of (1.0, -1.0], so a mask with
1.0 as the max (for example) was actually triggering the overflow detector
and falling back to the C path.

Round up with ceil(x + 1) instead, so 1.0 (for example) will be mapped
to 0.5 and won't overflow.
2018-03-04 18:30:25 +00:00
John Cupitt
bc0b8ba5c1 sobel done 2018-02-28 22:51:31 +00:00
John Cupitt
bf70c49fa5 add a fast uchar sobel 2018-02-27 18:19:07 +00:00
John Cupitt
4a59fa652c make vips_sobel()
cut out of vips_canny()
2018-02-26 18:33:20 +00:00
John Cupitt
0365e3403e add double threshold to canny
and some more tuning
2018-02-10 16:07:21 +00:00
John Cupitt
407291c3ff try a simpler edge detect in canny
simple +/- differencing seems to work better
2018-02-08 17:14:26 +00:00
John Cupitt
43cbd32955 try interpolating theta 2018-02-05 09:22:58 +00:00
John Cupitt
ce6d37189c non-interpolatory edge thinning works
woo
2018-02-03 17:34:49 +00:00
John Cupitt
6944f78452 add edge thinning to canny 2018-02-03 10:14:09 +00:00
John Cupitt
a93e8dd079 start adding canny
just adding edge thinning

see https://en.wikipedia.org/wiki/Canny_edge_detector
2018-02-02 17:00:23 +00:00
John Cupitt
487c112807 add VIPS_COMBINE_MIN combining mode
for vips_compass()
2017-11-02 12:34:01 +00:00
John Cupitt
008fd21728 all done 2017-10-14 17:03:48 +01:00
John Cupitt
36f21138d7 builds half float mask 2017-10-14 13:46:51 +01:00
John Cupitt
ec99ff5000 compiles 2017-10-14 12:38:48 +01:00
John Cupitt
0b3d7fc185 start half-float experiment 2017-10-13 18:06:58 +01:00
John Cupitt
c76b4893c0 convi was leaking vectors
we forgot to free the compiled code on dispose, oops

thanks MHeimbuc

see https://github.com/jcupitt/libvips/issues/771
2017-10-12 14:41:21 +01:00
John Cupitt
de82c9e919 allow much larger reduce factors
sometimes you want to use lanczos etc. for everything
2017-10-09 11:48:11 +01:00