Commit Graph

106 Commits

Author SHA1 Message Date
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
Kleis Auke Wolthuizen 3ed50e0427 Cleanup configure.ac and #ifdef's 2021-03-06 15:47:07 +01:00
Kleis Auke Wolthuizen e0b3e53c0e Speed up VIPS_ARGUMENT_COLLECT_SET
By using G_VALUE_COLLECT_INIT, see:
https://bugzilla.gnome.org/show_bug.cgi?id=603590
2020-10-10 19:48:52 +02: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 3a2bebdffb jpegload_stream registers 2019-10-10 22:02:39 +01:00
John Cupitt 99c0a674a4 fix typo in VIPS_ARG_POINTER
thanks  Fingolfin1196 !

see https://github.com/libvips/libvips/issues/1187
2018-12-20 16:44:52 +00:00
John Cupitt fec2f5f869 make vips_object_get_args() return an int
since malloc can fail
2018-08-20 08:45:46 +01:00
Kleis Auke Wolthuizen b5b756b817 Add vips_object_get_args
Handy for language bindings.
2018-08-19 22:42:26 +02:00
John Cupitt d251b37d92 add vips_argument_get_id()
We had a global we incremented to allocate property ids, but of course that
won't work with DLLs. Instead, add vips_argument_get_id() and call that to
allocate new prop ids.

See:

https://github.com/jcupitt/libvips/issues/985
2018-05-29 16:49:20 +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 b814baa78c fix various small doc problems 2016-07-13 17:07:26 +01:00
John Cupitt 6c6d0d6b78 fix some compiler warnings 2015-04-25 17:39:16 +01:00
John Cupitt 394149e9e8 fix all docs warnings 2014-11-17 10:32:40 +00:00
John Cupitt 6a25b04974 better docstrings
you now see:

class_method(cls, *args, **kwargs) method of gi.types.GObjectMeta
instance
    make a black image
    usage:
       out = Vips.Image.black(width, height, bands = gint)

    where:
       out        - Output image, VipsImage

    required parameters:
       width      - Image width in pixels, gint
       height     - Image height in pixels, gint

    optional parameters:
       bands      - Number of bands in image, gint
2014-11-13 14:37:59 +00:00
John Cupitt 266e120676 new C++ interface works!
phew
2014-10-27 12:57:28 +00:00
John Cupitt 952241a426 more cplusplus hackery 2014-10-21 14:55:38 +01:00
John Cupitt ae7d81d748 update cimg, integrate gmic
try:

$ vips gmic 1 x.jpg 20 1 1 --in0 k2.jpg -- "-blur 10"

output is black, but it does seem to almost work
2014-10-06 14:37:44 +01:00
John Cupitt c4a3e9a1a0 add VIPS_ARGUMENT_MODIFY
a flag for arguments meaning the operator will modify an input

the python binding uses this to take a copy of the arg before calling
2014-09-15 14:47:34 +01:00
John Cupitt 84e55b86e6 added class methods to python
we now have Vips.Image.black(w, h), woo
2014-09-08 14:53:37 +01:00
John Cupitt 7608524f61 fix up gtk-doc comments
fewer warnings now, phew
2014-09-03 14:32:55 +01:00
John Cupitt a8d04a7dd1 add op invalidate stuff
still need to test and link to cache
2014-06-12 09:22:28 +01:00
John Cupitt 30eff079f1 hide VipsFormat and VipsWrap7 classes 2014-06-10 14:43:46 +01:00
John Cupitt c03d9440cb added vips_object_set_from_string() 2014-04-23 12:57:49 +01:00
John Cupitt a17ef9b7c8 vips_system() allows many input images
you can change the image argument order too, with %Ns

added postbuild signal
2014-04-09 11:42:03 +01:00
John Cupitt 3bceb5286b better usage message
more sensible output for "vips max" or "vips getpoint"
2014-02-20 19:52:36 +00:00
John Cupitt b72818a2b8 add VIPS_OPERATION_DEPRECATED
and fix a tiny problem in vipswrap7
2014-02-03 13:23:58 +00:00
John Cupitt 57b6622690 track local mem allocs for debugging 2013-10-02 21:20:41 +01:00
John Cupitt 440b3a3362 fix up -DVIPS_DEBUG build 2013-07-15 10:49:49 +01:00
Benjamin Gilbert 8cc76a6ba3 Update address for Free Software Foundation
Also update LGPLv2.1 license text from the copy currently on the GNU
website.
2013-03-07 00:40:19 -05:00
John Cupitt 25a7b760d0 neater "header" output 2013-02-26 13:32:40 +00:00
John Cupitt 8f364a8b51 rename some _get funcs
all the _get_ funcs that returned a bool have become _isthing()
functions, eg.

vips_object_argument_get_assigned() ->
  vips_object_argument_isset()
2012-11-09 13:08:59 +00:00
John Cupitt 8df32c84c1 more work on vips_quadratic 2012-11-08 13:34:37 +00:00
John Cupitt 3216fddc92 easier array arg creation
added stdarg array double creator, used the _new as well, small other
fixes
2012-11-02 21:45:13 +00:00
John Cupitt 26f2105e5b make everything LGPL2.1+
some files were incorrectly tagged as GPL, thanks Dmitry
2012-09-17 11:52:32 +01:00
John Cupitt 88c3f7ab7d fix compiler warnings
some compiler warnings appeared in a production build (assert()s
commented out, -Wall, and -O2)

thanks to Dmitry Roshchin for the report
2012-08-14 12:43:54 +01:00
John Cupitt 8214d15982 more improvements to dzsave
now writes x_files and x.dzi, as per spec (thanks Benjamin)

deprecate tile_width and tile_height, just have tile_size now
2012-08-07 13:29:03 +01:00
John Cupitt 0c35f461dc add "deprecated" flag to vips arguments
deprecated arguments still work, but are not shown in help, nor are they
checked for "have-been-set"

you can tag required and optional args as deprecated ... obviously if
you deprecate a required argument you must replace it with a new
argument or scripts will break
2012-08-07 12:52:50 +01:00
John Cupitt 911a1c7e71 move vips_operation_set_valist_optional() to obj
now a method on object, vips_object_set()
2012-07-09 14:51:37 +01:00
John Cupitt 2cf57c123d much faster vips_argument_map()
improve the way we handle looping over args, gets us back to 7.26 speed
for example workspaces
2012-06-01 14:20:20 +01:00
John Cupitt d54c787e92 move COLLECT macros to object 2012-02-23 10:05:13 +00:00
John Cupitt 9ea1387a68 add FLAGS args 2012-02-20 21:02:37 +00:00
John Cupitt 5fd317941d rationalise the dumpers 2012-01-16 14:54:29 +00:00
John Cupitt c190c8e660 new Python binding
just a test thing for now, but seems to work OK

some small tweaks to help gobject-introspction
2012-01-05 13:26:25 +00:00
John Cupitt acd8ce277e just the cache to fix now 2012-01-02 15:50:41 +00:00
John Cupitt 405b89b000 get goi try.py going 2012-01-02 11:06:04 +00:00
John Cupitt 94fcf5f362 added object summaries 2011-12-14 14:03:30 +00:00
John Cupitt 7fe4843250 Merge remote-tracking branch 'origin/master' into format-hacking
also, start adding openslide.c to foreign

Conflicts:
	ChangeLog
	TODO
	libvips/iofuncs/image.c
2011-12-11 15:54:08 +00:00
John Cupitt b9747f5a06 various size_t->guint64 fixes
some platforms have off_t as 32-bits breaking large file support ...
make sure we use guint64 everywhere
2011-12-09 09:42:39 +00:00