Commit Graph

233 Commits

Author SHA1 Message Date
Kleis Auke Wolthuizen 0629a5de7f
Ensure consistent formatting of `->format_table` (#3199) 2022-11-30 09:41:05 +00:00
Kleis Auke Wolthuizen 6d43755bfa
convi/reducev: initialize the sum with the addition (#3052)
* reducev: initialize the sum with the addition

Avoids an Orc opcode.

* convi: initialize the sum with the addition

Avoids an Orc opcode.

* vector: add comments to magic numbers
2022-09-17 14:18:15 +01:00
Kleis Auke Wolthuizen d874010d09
convi/reducev: use convsuswb in Orc path (#3053)
* reducev: use convsuswb in Orc path

Saves a few instructions.

* convi: use convsuswb in Orc path

Saves a few instructions.
2022-09-17 12:26:00 +01:00
Kleis Auke Wolthuizen f43f7844a7
convf: bake the scale into the mask (#2974)
Similar to the vector path of vips_convi.
2022-08-02 14:21:07 +01:00
John Cupitt 538aa2a841
remove autotools (#2941)
* remove autotools

It seems to all work. I tested with gtk-doc enabled. I probably missed a
few things argh.

* oop, forgot m4/
2022-07-24 11:14:52 +01:00
John Cupitt d9f31be67d configure should add meson files to make dist
add meson.build etc. to EXTRA_DIST

see https://github.com/libvips/libvips/issues/2876
2022-06-20 15:04:33 +01:00
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