Commit Graph

105 Commits

Author SHA1 Message Date
John Cupitt
fd0a0905ff note VImage::new_from_memory_steal() in ChangeLog
plus doxy commnets etc., see https://github.com/libvips/libvips/pull/1758/
2020-09-24 10:44:49 +01:00
John Cupitt
25bd6cce6f
Merge branch 'master' into master 2020-09-24 10:31:01 +01:00
John Cupitt
875c0fdf3c finish C++ doc comments 2020-09-09 11:13:22 +01:00
John Cupitt
6357fd5651 more C++ docs 2020-09-07 19:26:51 +01:00
John Cupitt
3fcaf1ea06 add some more C++ docs 2020-09-07 18:02:50 +01:00
John Cupitt
fa84d297dd note how to list interpolators 2020-08-20 07:05:13 +01:00
John Cupitt
409301a200 improve C++ API
Make VObject inheritance public, so we can have a single set() for all
VObject-derived types.
2020-08-19 15:08:28 +01:00
John Cupitt
99313edb68 fix some unknown types
We were missing VipsInterpolate and guint64. Add guint64 set() as well.

see 636e265477 (commitcomment-41589463)
2020-08-19 14:36:50 +01:00
John Cupitt
d4c20e6d1c a few more doc comments 2020-08-18 01:28:40 +01:00
John Cupitt
5e985ad187 add doc comments for VError and VInterpolate 2020-08-17 19:16:03 +01:00
John Cupitt
636e265477 revise cpp codegen again
use f'' strings, polish formatting
2020-08-17 18:07:11 +01:00
John Cupitt
c7bab32109 add optional params to doc strings 2020-08-17 14:11:17 +01:00
John Cupitt
0d9dce4326 move vips-operators.h into the header
doxy hates #include inside classes
2020-08-17 10:58:49 +01:00
Kyle Schwarz
557bc5f6b4 Don't check g_signal_connect()'s return 2020-08-02 10:16:55 -04:00
Kyle Schwarz
fe815ff587 Add C++ bindings for new_from_memory_steal()
new_from_memory_steal() will create a new image with the input
buffer and will "move" the data into the image. The buffer is then
managed by the image, and will be freed when it goes out of scope.
2020-08-01 21:58:14 -04:00
John Cupitt
105e56939a update cplusplus API for 8.10 2020-07-05 22:38:08 +01:00
Kleis Auke Wolthuizen
e5323b070b Update C++ binding and function list 2020-06-18 14:45:14 +02:00
John Cupitt
78f927e606 revide comments in cpp binding 2020-03-27 11:42:58 +00:00
jaubourg
28b4c918b6 allow null image as source for assignment and copy constructor: fixes #1595 2020-03-27 02:46:57 +01:00
Kleis Auke Wolthuizen
31bf0e3cb7 Update function list for stream -> source rename 2020-01-01 12:28:18 +01:00
John Cupitt
95444d0849 rename stuff in the C++ API for stream -> source 2019-12-30 17:49:41 +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
Kleis Auke Wolthuizen
2499b38403 Update C++ binding and function list
The generators use the new Introspect class of pyvips.
2019-11-29 14:51:03 +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
123c52be70 revert to call-by-value for c++ API 2019-11-13 08:44:59 +00:00
John Cupitt
92521c0dc6 add options back to VInterpolate
since we might use them in the future
2019-11-12 14:03:25 +00:00
John Cupitt
b8ea3f8442 update cpp interface for stream variable rename 2019-11-11 09:24:45 +00:00
Kleis Auke Wolthuizen
b49910d270 Add support for streaming in the C++ binding
See: libvips/libvips#1443.
2019-11-10 13:46:29 +01:00
Kleis Auke Wolthuizen
42bb8f51b9 Support std::vector within the image_get/set_array_int functions 2019-07-15 15:29:19 +02:00
Tomáš Szabo
1b54684650
Add set and get for an array of ints 2019-07-05 17:29:11 +02:00
Kleis Auke Wolthuizen
8ac6574560 Change 'char *' to 'const char *' in the C++ binding
+ some documentation improvements.
2019-04-24 16:02:52 +02:00
John Cupitt
bae484ba2c remove old c++ and py interfaces
Instead, use the new(er) vips8 C++ interface, and the new(er) python
interface in pypi.

https://pypi.org/project/pyvips
2019-04-12 16:27:28 +01:00
John Cupitt
38bd4f1be4 break lines at 80 cols in gen-operators
plus tiny cleanups
2019-02-03 13:18:22 +00:00
kleisauke
241f52fb54 Fix compatibility with Makefile
+ all operations are now provided with a C++ style comment block.
2019-02-03 12:13:04 +01:00
kleisauke
de27688eea Use pyvips to generate the C++ binding 2019-02-01 21:45:12 +01:00
John Cupitt
75ebb162f9 Merge branch 'master' into add-icc-fallbacks 2019-01-12 13:58:30 +00:00
Kleis Auke Wolthuizen
c397543c8e Add a std::string overload function for new_from_buffer 2019-01-11 13:53:09 +01:00
Kleis Auke Wolthuizen
bd5711ef8e Add remove function to the C++ binding
To remove an item of metadata.
2019-01-10 17:39:45 +01:00
Kleis Auke Wolthuizen
cd340d0ace Add missing C++ functions
The functions has_alpha() and copy_memory() were missing from the C++ binding.
2019-01-10 14:56:04 +01:00
John Cupitt
b8a158b69b seems to work
added some more consts as well
2019-01-03 13:34:13 +00:00
John Cupitt
26d0e312c6 add bandand/or/eor to the cpp binding
oops, they had been dropped

thanks clcaalu

see https://github.com/libvips/libvips/issues/1165
2018-11-16 13:10:22 +00:00
Fingolfin1196
c7f828e968
Update VImage8.h
Should fix the “nullptr undeclared” issue.
2018-10-10 15:57:50 +02:00
Fingolfin1196
b0f21d2727
Update VImage8.h
VObject now has an is_null check, which is then used in VImage.
2018-10-10 15:48:23 +02:00
John Cupitt
0e3cac1a72 make cpp overloads const
all overloads are declared const now, where possible

also revised cpp examples and ran them to check

see https://github.com/jcupitt/libvips/issues/983
2018-06-11 15:24:11 +01:00
John Cupitt
ca6410e1a6 make members and getters "const" in cpp api
eg. VImage::width() is now

	int VImage::width() const;

ie. it does not alter the image objects. In factr we can mark almost all
members const.

see https://github.com/jcupitt/libvips/issues/983
2018-06-11 14:30:17 +01:00
Lovell Fuller
cea15b2d8f Prevent compiler warning with size_t to int cast 2018-02-03 18:05:07 +00:00
John Cupitt
10eef89a7f update c++ bindings 2017-11-26 17:45:04 +00:00
John Cupitt
e52d2c9f7f add composite shortcut to cpp
two composite just two images
2017-10-06 16:56:20 +01:00
John Cupitt
f0aeed1c64 regenerate cpp binding for new methods 2017-10-06 16:39:52 +01:00
Lovell Fuller
8bd2208e5e cplusplus: offset coords are int rather than double 2017-09-14 10:25:15 +01:00