John Cupitt
5569022dbd
use G_GNUC_* attribute system
...
Instead of our own compiler attr thing.
see https://github.com/libvips/libvips/issues/2871
2022-09-23 14:37:35 +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
Corentin Noël
542dd06999
Refine header inclusion to allow better introspection generation ( #2654 )
...
The headers need to be self-contained for the introspection parser
to work correctly. The entry for external users remains vips/vips.h
2022-02-15 05:02:07 +00:00
John Cupitt
25bd6cce6f
Merge branch 'master' into master
2020-09-24 10:31:01 +01:00
John Cupitt
b981911f67
remove redefinition of typedefs
...
We had this in a couple of places:
typedef struct _A A;
typedef struct _A A;
Some old gccs (eg. centos6) throw errors for this.
See https://github.com/libvips/libvips/issues/1774
2020-08-13 12:51:56 +01:00
Kyle Schwarz
b372fde637
Add parameter name for unused image
2020-08-02 11:04:10 -04:00
Kyle Schwarz
81920963b1
Remove cast in free() call
2020-08-02 10:19:47 -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
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
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
72cbaa9ea3
more revision
2019-10-21 15:04:30 +01:00
John Cupitt
6f0002c023
add plumbing for stream minimise
...
and ::finish becomes a vfunc
2019-10-13 20:59:02 +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
01a82646a1
experiment with minimise in insert
...
try minimising sub after we've passed it
2019-07-27 13:40:18 +01:00
John Cupitt
91d0e7e3d0
move kill mechanism to public API
...
the vips_image_set_kill() system was internal. Move it to the public
API.
See eg.:
https://github.com/kleisauke/net-vips/issues/31
2019-04-06 16:53:42 +01:00
John Cupitt
7882602dfe
C/C++ done
...
python next
2017-04-26 14:52:28 +01:00
John Cupitt
e6b20cbd0f
Revert "remove stalling"
...
This reverts commit 959f412380
.
2017-02-27 10:26:32 +00:00
John Cupitt
e7ae10ef68
Revert "more UNBUF fixes"
...
This reverts commit a4d3c2a754
.
2017-02-27 10:25:41 +00:00
John Cupitt
a4d3c2a754
more UNBUF fixes
...
try to keep compat better, remove the single-thread-first-tile idea
2017-02-21 16:53:48 +00:00
John Cupitt
959f412380
remove stalling
2017-02-21 15:03:15 +00:00
John Cupitt
f302bd6570
all working!
2017-01-12 14:06:54 +00:00
John Cupitt
d1ef5a6890
compiles, needs more testing
2017-01-11 14:05:50 +00:00
John Cupitt
3f1f950bff
add vips_image_hasalpha()
2016-10-31 11:14:27 +00:00
John Cupitt
b5781a5760
Merge branch '8.3'
2016-07-30 10:57:40 +01:00
John Cupitt
88148318eb
fix performance regression
...
the extra check on bandfmt in sizeof() in 8.3.2 was causing some performance
problems ... move the check to file read, so we only do it once
per image, not once per pixel or scanline
thanks Lovell!
2016-07-30 10:51:54 +01:00
John Cupitt
9c18f1b4d5
yet mmore doc fixes
...
classes are working again in gtk-doc, yay
2016-07-13 22:39:16 +01:00
John Cupitt
ee1874c5ca
much better handling of arrayimage cli args
...
we were not setting the access hint on arrayimage args, so
arrayjoin "$(echo *.jpg)" x.tif[bigtiff] --across 10
would open all the jpg images to memory, usually, in random mode
now arrayimage args see the operation's access hint (seq in this case),
for much better behaviour
also, we allow any whitespace as an arg separator in arrayimage from
string
2016-02-27 20:37:20 +00:00
John Cupitt
1504ca7cdc
have a more formal max image dimension
...
we now have VIPS_MAX_COORD for maximum image dimension, set to 10m
pixels ... we could go up to 2bn, but 10m seems a reasonable max, at
least for now
see https://github.com/jcupitt/libvips/issues/355
2015-12-03 12:14:39 +00:00
John Cupitt
2409767679
add vips_image_new_from_memory_copy()
...
takes a copy of a memory area when making an image ... this helps bindings
for languages which don't have much control over memory
see https://github.com/jcupitt/libvips/issues/346
2015-11-25 17:05:59 +00:00
John Cupitt
5160010eda
add vips_array_image_empty()/_append()
...
to help bindings without init from array
2015-10-25 17:15:45 +00:00
John Cupitt
2b46b7e889
many more const decls
...
ruby gobject-introspection is quite fussy about needing a lot of const
declarations ... these changes help vips_image_matrix_from_array()
appear in Ruby
2015-10-23 11:45:11 +01:00
John Cupitt
a42232a9a1
boilerplate for hsv colourspace
2015-06-09 10:18:30 +01:00
John Cupitt
42efce5c66
fix various typos
...
thanks dg1727
see https://github.com/jcupitt/libvips/issues/277
2015-04-21 18:39:02 +01:00
John Cupitt
7495690cd6
remove vips__image_sizeof_bandformat
...
we had main API macros which used an array behind the scenes,
vips__image_sizeof_bandformat[]. Swap this for a function,
vips_format_sizeof(), to help DLLs.
the array symbol is still there for compatibility
2015-04-20 14:18:17 +01:00
John Cupitt
24084aed85
Merge branch 'add-copy-to-memory'
2015-04-19 11:13:15 +01:00
John Cupitt
54c37e7e0d
add copy-to-memory
...
try to make a threadsafe vips_image_wio_input()
2015-04-19 09:45:20 +01:00
John Cupitt
339f268200
add some API for args, fix a docs messup
2015-03-02 22:02:33 +00:00
John Cupitt
9d11c02e35
version bump
2015-02-06 13:39:39 +00:00
John Cupitt
29d073c04c
now compiles cleanly with -Wstrict-prototypes
...
some downstream packages were seeing lots of spurious warnings
2015-01-21 09:02:56 +00:00
John Cupitt
f2898a8e3b
more C++ hacking
2014-10-20 14:54:03 +01:00
John Cupitt
14d7ce1e91
first try, not very good
2014-10-16 19:16:45 +01:00
John Cupitt
3788c85e54
gmic uses an imagevec for input images
2014-10-06 21:52:27 +01:00
John Cupitt
d7083d7a03
make arrayimage ref/unref
2014-09-23 14:38:46 +01:00
John Cupitt
751982d9f0
add make vips matrix from python array
2014-09-05 14:53:05 +01:00
John Cupitt
92570b119c
python new_from_memory()/write_to_memory() done
2014-09-05 12:54:07 +01:00
John Cupitt
7608524f61
fix up gtk-doc comments
...
fewer warnings now, phew
2014-09-03 14:32:55 +01:00
John Cupitt
3b43bd76f3
set options in filenames in vips8 Python
...
now supports "fred.jpg[Q=90]" in Vips.Image.new_from_file() etc.
2014-08-31 21:16:39 +01:00
John Cupitt
a370e5003e
vips array types are more binding-friendly
...
this all works now:
```python
from gi.repository import Vips
a = Vips.ArrayDouble.new([1,2,3])
a.get()
a = Vips.ArrayInt.new([1,2,3])
a.get()
a = Vips.ArrayImage.new([c, d, e])
a.get()
```
2014-08-31 10:41:53 +01:00
John Cupitt
b7f16a1de9
more docs work
2014-06-16 14:28:00 +01:00