Keim, Stefan
f75f698ab4
Add atan2 to math2
2021-06-18 11:14:02 +02:00
Remi Collet
ea48b6a482
use /lib64 instead of /lib when needed
2021-06-15 15:17:35 +02:00
John Cupitt
e96fc955bc
comment reason for thread_execute revert
2021-06-07 14:30:21 +01:00
John Cupitt
939437d56e
Merge commit '4c263a36e9e728b5ab5cc1f4f3cafe5738a6b6e7' into 8.11
2021-06-07 14:26:58 +01:00
Kleis Auke Wolthuizen
4c263a36e9
Don't run sinkscreen thread in threadpool
...
Since threads on Windows can be terminated prior to the execution
of the atexit registered functions (i.e. vips_shutdown), causing
a surprising deadlock. This thread is never recycled, so it should
be fine.
Reverts commit d1b4d12388
partially.
2021-06-07 14:39:47 +02:00
John Cupitt
f39e2e271d
don't invalidate in sinkscreen
...
it was called from a bg thread and could race when under heavy load, eg.
vipsdisp displaying animated jpg images
2021-06-06 16:53:00 +01:00
John Cupitt
3870baef33
free argv0 a little later
2021-06-01 19:02:41 +01:00
John Cupitt
43efbde995
Merge pull request #2276 from okft/master
...
Clean up more resources in vips_shutdown
2021-06-01 19:00:06 +01:00
GOUJON Évan
3015bb4eeb
Clean up more resources in vips_shutdown
2021-06-01 19:32:59 +02:00
John Cupitt
eca400e953
don't set g_set_prgname()
...
this should be set in the app layer, not by libraries
2021-06-01 10:29:54 +01:00
GOUJON Évan
3e9da95b84
Clean up more resources in vips_shutdown
2021-05-31 19:13:57 +02:00
John Cupitt
889ca96648
allow 10,000 frame GIFs
...
the old limit was 1,000, which was a little low
2021-05-25 14:08:19 +01:00
Kleis Auke Wolthuizen
1562ba695a
Ensure compatibility with Cygwin
...
G_PLATFORM_WIN32 is no longer defined for Cygwin.
2021-05-17 11:54:46 +02:00
John Cupitt
f637206e8d
move vips_threadpool_push to internal API
...
and rename as vips__thread_execute()
2021-05-17 08:42:39 +01:00
John Cupitt
dac75219b2
fix warning on 32-bit platforms
2021-05-16 17:47:04 +01:00
John Cupitt
d577b18e69
oop, dropped a comment
2021-05-11 18:10:54 +01:00
John Cupitt
eef3f9568d
revise threadpool comments and docs
2021-05-11 10:23:05 +01:00
John Cupitt
7391418d09
revise comment
2021-05-08 20:15:10 +01:00
John Cupitt
6d9308d93c
fix a couple of compiler warnings
2021-05-08 19:51:01 +01:00
John Cupitt
98946e5e15
Merge pull request #2235 from kleisauke/reuse-threads
...
Reuse threads by using the thread pool of GLib (#2038 )
2021-05-08 18:52:04 +01:00
akash-akya
e39142bab2
Update doc for vips_image_get_string
2021-05-05 18:23:11 +05:30
Kleis Auke Wolthuizen
83575e347a
Use gatomicrefcount in sinkscreen
2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen
060ab7c7a2
Free the calculated pixel buffer cache early
...
Since threads can be reused, we need to free the
calculated pixel buffer cache early (i.e. during
vips_thread_shutdown).
This (partially) reverts commit 1a915db
.
2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen
91a143e5c9
Swap g_private_set with g_private_replace where possible
...
There's a possibility that the old GDestroyNotify
handler is not called when threads are being reused.
2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen
d1b4d12388
Move sink_disc and sink_screen threads to threadpool
...
And deprecate the vips_g_thread_new and vips_g_thread_join
functions.
2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen
4144049174
Remove mutex lock for VipsThreadStartFn
...
vips_{avg,deviate,hough,max,min,stats} are the only arithmetic functions
that do not require a mutex on the _start and/or _stop function. All
other arithmetic functions still needs this, so move it to sink instead.
2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen
80e0cc3d12
Reuse threads by using GLib's threadpool
2021-05-03 13:21:45 +02:00
John Cupitt
edcdf8af70
rebase add-jp2ktiff on master
2021-04-26 15:16:20 +01:00
Kleis Auke Wolthuizen
5c54d13701
Support `G_MODULE_SUFFIX` as suffix for modules
...
In addition to the `.plg` suffix, which is still present for
backwards compatibility reasons.
2021-04-22 12:28:37 +02:00
Kleis Auke Wolthuizen
a63d37fc9b
Initial support for dynamic loadable modules with GModule
2021-04-22 12:28:37 +02:00
Kleis Auke Wolthuizen
2735b71292
Simplify preprocessor directives
2021-04-22 12:04:05 +02:00
John Cupitt
f74d6c795d
Merge branch 'master' into add-libnsgif
2021-03-07 14:37:14 +00:00
Kleis Auke Wolthuizen
3ed50e0427
Cleanup configure.ac and #ifdef's
2021-03-06 15:47:07 +01:00
John Cupitt
799f720c13
Merge branch 'master' into add-libnsgif
2021-02-27 23:57:14 +00:00
Lovell Fuller
117dbd888a
Set minimum glib dependency version of 2.40 (March 2014)
2021-02-24 21:59:21 +00:00
John Cupitt
fee6a8a52b
fix int overflow in vips_region_copy
...
this could cause crashes with very wide images, see:
https://github.com/libvips/libvips/issues/1989
2021-02-22 10:02:03 +00:00
John Cupitt
8dc2db9789
add gif background colour as metadata
2021-02-20 04:52:02 +00:00
John Cupitt
1f4f975e7d
make leak test exit with an error code
...
and run the libvips leak test in CI
2021-02-08 11:25:56 +00:00
John Cupitt
8d95f9db2b
tiny fixes
2021-02-05 16:56:44 +00:00
John Cupitt
a7acdf567c
source rewind reenables sniff mode
...
so you can rewind most sources after reading (though not pipes)
2021-01-21 14:30:46 +00:00
Lovell Fuller
3ad7363104
heifsave: add option to control subsample_mode
...
Defaults to no subsampling when Q>90 for consistency with jpegsave.
Deprecate VipsForeignJpegSubsample enum, replace with more generic
VipsForeignSubsample.
2021-01-13 10:01:34 +00:00
John Cupitt
1ca20dbddd
make vips format detection a little more robust
2021-01-02 19:07:00 +00:00
John Cupitt
df3b80fa40
add vipssave_target()
2021-01-02 15:49:32 +00:00
John Cupitt
e23f0c58f6
finish up ginputstream source
2020-12-29 16:08:45 +00:00
John Cupitt
0c53d05598
free attr result
2020-12-28 22:03:03 +00:00
John Cupitt
f368c0add9
try to get the path for the stream
2020-12-28 18:26:02 +00:00
John Cupitt
aa6046d728
remove debug line
2020-12-28 15:20:14 +00:00
John Cupitt
98be88bf80
add sourceginput
...
This is a source which wraps a GInputStream. You can use this to eg.
efficiently load a PNG file from a GFile object.
2020-12-28 15:14:36 +00:00
John Cupitt
eeb0fb3ac1
Merge branch '8.10'
2020-12-22 12:56:32 +00:00
Kleis Auke Wolthuizen
e437805fc1
Move descriptor test to vips_source_seek_real
...
Since subclasses could override the seek method without setting the file descriptor.
2020-12-22 13:34:14 +01:00
Kleis Auke Wolthuizen
2eeeedc957
Avoid seeking on bad file descriptors
2020-12-22 11:20:03 +01:00
Kleis Auke Wolthuizen
cc8f93a3ff
Ensure memory source is non-null
2020-12-22 11:19:52 +01:00
John Cupitt
5f3482bff5
Merge branch '8.10'
2020-12-03 13:58:33 +00:00
John Cupitt
f99da5f3e1
docs clarification
...
https://github.com/libvips/libvips/issues/1912
2020-12-01 18:33:40 +00:00
John Cupitt
c088097b50
block deprecation warnings from libgsf
...
with an uglu gcc progma
2020-11-29 14:41:19 +00:00
John Cupitt
deab095b3c
Merge branch '8.10'
2020-11-29 14:03:22 +00:00
John Cupitt
2585565b3e
better test for output to target
...
We used to enable write to stdout if the first character of an output filename
was ".", eg.:
vips copy x.jpg .png
But this will also enable write to stdout for things like:
vips copy x.jpg ./y.png
This patch also tests that the rightmost "." in a filename is also the
first character.
Thanks barryspearce
See https://github.com/libvips/libvips/issues/1906
2020-11-29 13:59:30 +00:00
John Cupitt
864075c4f4
Merge branch '8.10'
2020-11-26 10:18:27 +00:00
John Cupitt
acc579cc9d
force binary mode for connections on win
...
stdin / stdout (for example) are created in text mode by default on
win. We need to flip them to binary mode for connection read and write.
See https://stackoverflow.com/questions/65014352/pipe-libvips-cli-output-to-stdout-in-windows
2020-11-26 10:15:48 +00:00
John Cupitt
f6d7af46b8
Merge branch '8.10'
2020-11-24 11:15:45 +00:00
Kleis Auke Wolthuizen
77de1c473a
Determine endianness at compile time
2020-11-23 14:39:06 +01:00
Kleis Auke Wolthuizen
d9dec2c027
Simplify MSB-ordered image check
2020-11-23 14:35:03 +01:00
Kleis Auke Wolthuizen
9bb86119e3
Ensure vipsload only byte swaps if necessary
...
Prior to this commit, MSB-ordered vips images were always byte swapped
on both little- and big endian systems. And LSB-ordered vips images
were loaded without a byte swap. This works correctly on little endian
systems, but will not work on big endian systems where the byte swap
must be done vice versa.
This commit ensures that the byte swap only takes place when needed.
See https://github.com/libvips/libvips/issues/1847 .
2020-11-23 14:32:36 +01:00
John Cupitt
013e8beba7
Merge branch '8.10'
2020-11-11 10:06:22 +00:00
John Cupitt
6894159ad5
fix icc-profiles and dzsave --no-strip
...
We were not copying metadata down pyramid layers in dzsave, so
--no-strip didn't allow icc profiles on tiles.
Thanks altert
See https://github.com/libvips/libvips/issues/1879
2020-11-11 10:02:46 +00:00
John Cupitt
3e40f19efc
Merge branch '8.10'
2020-11-10 11:07:41 +00:00
John Cupitt
1686725117
block annoying INFO messages on some older glibs
...
Some old glibs can display INFO messages by default. Block these
ourselves.
See https://github.com/libvips/libvips/issues/1876
2020-11-10 11:03:18 +00:00
John Cupitt
774b7fcf6f
Merge branch '8.10'
2020-10-19 14:41:51 +01:00
John Cupitt
0131d4d3eb
fix vips7 webp load
...
webp load using the vips7 interface was crashing, thanks barryspearce
see https://github.com/libvips/libvips/issues/1860
2020-10-19 14:34:02 +01:00
John Cupitt
74d399088a
Merge branch '8.10'
2020-10-04 14:26:40 +01:00
John Cupitt
edbe9bf8ef
revise pipe sources (again)
...
Simplify and cleanup.
2020-10-04 14:05:53 +01:00
John Cupitt
727eb2ee39
Merge branch '8.10'
2020-10-03 18:29:23 +01:00
John Cupitt
0ee8b1e844
improve seek on pipes
...
There were a few issues in VipsSource around seeking on pipes. With this
patch, EOF detection is better, and pipe sources automatically turn into memory
sources when EOF is hit.
see https://github.com/libvips/libvips/issues/1829
2020-10-03 18:25:24 +01:00
John Cupitt
c27c471e28
Merge branch '8.10'
2020-09-28 12:33:32 +01:00
John Cupitt
e3181e0579
get docs building with goi 1.66+
...
It builds now, but some doc sections are missing. Fix this properly in
8.11.
See https://github.com/libvips/libvips/issues/1836
2020-09-28 12:32:06 +01:00
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
801111a2fa
better dint rules
...
We had some special cases coded for dhint inheritance, but they could
fail in some edge cases. Revert to something simpler and more
predictable.
see https://github.com/libvips/libvips/issues/1810
2020-09-08 13:50:14 +01:00
John Cupitt
99423649b9
start sinkscreen thread on first use
...
we were starting the sinkscreen background thread during vips_init() --
instead, start it on first use
see https://github.com/libvips/libvips/issues/1792
2020-08-28 17:46:23 +01:00
Kyle Schwarz
b372fde637
Add parameter name for unused image
2020-08-02 11:04:10 -04:00
Kyle Schwarz
292dc9da4b
Remove redundant part of comment
2020-08-02 10:20:44 -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
John Cupitt
58b6d73a70
deprecate vips_popen()
...
it didn't work well on win, and we no longer use it anyway
2020-07-27 15:21:59 +01:00
John Cupitt
e44b781971
revise gifnsload.c for source API
2020-07-07 15:50:44 +01:00
Kleis Auke Wolthuizen
b84e87b6d2
Improve --vips-config output
2020-07-07 13:57:25 +02:00
Kleis Auke Wolthuizen
e91997052b
Out-of-source support for autogen.sh
2020-07-07 12:16:43 +02:00
Kleis Auke Wolthuizen
fb61f0fa44
Define ENABLE_DEPRECATED in config.h
...
Do not check for VIPS_ENABLE_DEPRECATED as it could
come from an earlier version of libvips.
2020-07-07 12:16:43 +02:00
John Cupitt
5117c1a980
remove mode_t from headers
...
it seems to fail with MSVC.
int works fine, and is what g_open() uses.
2020-07-04 18:28:44 +01:00
John Cupitt
d6c4d23d6c
Merge branch 'master' into add-libnsgif
2020-07-03 02:24:09 +01:00
John Cupitt
e728e5638d
Merge pull request #1697 from kleisauke/wasm-function-pointers
...
Support for use in WASM environments (#192 )
2020-07-03 02:09:39 +01:00
John Cupitt
207d40f640
better leak test output
2020-07-02 14:15:58 +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
John Cupitt
345fee4917
Merge branch 'master' into add-libnsgif
2020-06-29 23:07:13 +01:00
John Cupitt
e3a500204a
Merge pull request #1593 from kleisauke/disable-deprecated
...
Fix for --disable-deprecated (#1273 )
2020-06-28 11:07:56 +01:00
John Cupitt
aba15122d5
reduce default cache size
...
Now 100 operations by default.
2020-06-28 09:52:58 +01:00
Kleis Auke Wolthuizen
8abcae3abc
Avoid using vips7 symbols
2020-06-18 14:21:43 +02:00
Kleis Auke Wolthuizen
230d2acfea
Disable IM_* environment variables when --disable-deprecated
2020-06-18 14:15:37 +02:00
John Cupitt
8c19e07ae3
add --vips-config flag
...
so "vips --vips-config" now displays:
```
$ vips --vips-config
native win32: no, native OS X: no, open files in binary mode: no, ...
```
2020-06-12 17:30:57 +01:00
John Cupitt
981d5c4b16
revise autorot system
...
- deprecate vips_autorot_get_angle() since orientation is no longer a
simple rotate
- add vips_image_get_orientation() and vips_image_get_orientation_swap()
- revise tiff and jpeg loader autorotate to just call vips_autorot(),
but only if necessary
- revise thumbnail autorotate too
2020-06-06 17:25:46 +01:00
John Cupitt
cff84f4606
add subifd pyr support to thumbnail
...
thumbnail can spot subifd pyramids and load lower levels if necessary
2020-06-02 12:53:36 +01:00
John Cupitt
383be359e8
Merge pull request #1626 from kleisauke/remove-varargs-open
...
Remove use of varargs in vips_*_open
2020-04-30 14:02:37 +01:00
Kleis Auke Wolthuizen
cdf0269871
Ensure vips__temp_name creates unique filenames
...
There was a possible chance that vips__temp_name could generate the
same filename twice if it is called concurrently.
This commit ensures that the serial increment is an atomic operation,
similar to #1211 .
2020-04-27 15:27:33 +02:00
Kleis Auke Wolthuizen
6fc2015783
Remove use of varargs in vips_*_open
...
This matches the declaration of g_open and helps tools (such as ASan) when
running on non-native platforms.
2020-04-27 11:56:32 +02:00
John Cupitt
9ea91810bb
revise docs for _inplace
...
We call vips_image_inplace() automatically now, so there's no need for
clients to use this.
see https://github.com/libvips/libvips/issues/1610
2020-04-16 12:09:07 +01:00
John Cupitt
168db157bf
more dbg output
2020-04-15 17:21:41 +01:00
John Cupitt
8ba31844d6
fix a race in startup
...
We were creating a background thread before creating the semaphore that held
the thread. This could sometimes segv under a debugger.
2020-04-15 16:53:58 +01:00
John Cupitt
8840bc8a14
better render init stops a race
...
when running inside some versions of gdb
2020-04-02 14:23:06 +01:00
Lovell Fuller
3ca21ee2e8
Increase minimum glib-2.0 dependency to v2.15 (released March 2012)
2020-03-26 19:13:21 +00:00
John Cupitt
e9c47200dc
Merge pull request #1591 from kleisauke/get-language-names
...
Only call g_get_language_names when GLib < 2.48.1
2020-03-24 17:05:49 +00:00
Kleis Auke Wolthuizen
ceacd0bab9
s/count/af_count/
...
Thanks lovell!
2020-03-24 12:55:07 +01:00
Kleis Auke Wolthuizen
4911928412
Only call g_get_language_names when GLib < 2.48.1
...
The thread-safety problem was fixed in GLib 2.48.1.
See: https://bugzilla.gnome.org/show_bug.cgi?id=748474
2020-03-24 11:14:47 +01:00
Kleis Auke Wolthuizen
af21838fab
Use g_get_num_processors() when GLib >= 2.48.1
...
Also backport the patch from https://bugzilla.gnome.org/show_bug.cgi?id=748530
2020-03-24 11:11:46 +01:00
John Cupitt
834234c23c
add `all` smartcrop mode
...
So you can crop to fill as well as crop to fit.
see https://github.com/libvips/libvips/issues/1583
2020-03-19 18:57:40 +00:00
John Cupitt
d4f12a9999
move VipsGInputStream to public API
...
Since we will need it for pdfload as well.
2020-03-11 17:17:45 +00:00
John Cupitt
a592d99bb2
add dir detector
...
useful for blocking open for read of directories
2020-03-06 18:05:16 +00:00
John Cupitt
d13c0a69fd
Merge branch 'master' of github.com:libvips/libvips
2020-03-06 13:05:38 +00:00
John Cupitt
6117310c18
improve file open error handling
...
better behaviour if you try to open a directory as an image
2020-03-05 15:30:37 +00:00
John Cupitt
68f766b482
Merge branch '8.9'
2020-03-05 15:03:00 +00:00
John Cupitt
b3a7929247
detect read errors in sniff correctly
...
we has a signed/unsigned mixup :(
2020-03-05 15:02:16 +00:00
John Cupitt
9ef8b55218
better handling of short files in vips7 compat
...
the sniffer could read beyond the end of the file sometimes
2020-03-04 17:38:41 +00:00
John Cupitt
ce240b1ca2
revise matrixload for source API
2020-02-22 15:02:12 +00:00
John Cupitt
d68e02a3c4
Merge branch 'revise-csvload'
2020-02-21 18:23:13 +00:00
John Cupitt
71c15958ed
new csvload seems to work
2020-02-21 16:04:29 +00:00
John Cupitt
0a23bf3578
revise formatting, add docs
...
fix up some formatting from https://github.com/libvips/libvips/pull/1552
plus some other small changes
2020-02-18 17:37:56 +00:00
elad laufer
d2b794ec35
- use a single enum and switch that replaces no_subsample, force_subsample
2020-02-17 11:29:57 +02:00
alon-ne
f88dab9ccd
Fix gif dispose handling for DISPOSE_BACKGROUND and DISPOSE_PREVIOUS
...
- Add 'scratch' field to gif that holds temporary 'scratch buffer' used for rendering frames
- For DISPOSE_BACKGROUND: Set background color to transparent instead of 0
- For DISPOSE_BACKGROUND: Write background pixels into scratch after rendering current frame, so it will be used in next frame
- For DISPOSE_PREVIOUS: Save frames that are not disposed into 'previous' field in gif, when DISPOSE_PREVIOUS is specified start with that previous frame. see http://webreference.com/content/studio/disposal.html
- Add "ANIMEXTS1.0" to Application Extension parser
- Graphic Control Extension parser refactor
- Compare file contents to expected images for animated gifs in foreign tests
2020-02-06 17:36:13 +02:00
John Cupitt
f866799474
move pipe read limit to gint64
...
We had a mix of size_t and gint64. Just use gint64 everywhere.
2020-02-05 14:42:03 +00:00
John Cupitt
862e1ae214
add VIPS_LEAK env var
2020-02-03 17:01:57 +00:00
John Cupitt
cf5cad2b3e
make pipe read limit configurable
...
We had a 1gb limit on the amount of data we would read from a pipe
before giving up.
This patch adds vips_pipe_read_limit_set() and makes this limit
configurable.
See: https://github.com/libvips/libvips/issues/1540
2020-02-03 16:57:10 +00:00
John Cupitt
46da95f30f
Merge branch '8.9'
2020-01-31 16:00:22 +00:00
John Cupitt
e4db74746a
fix a deadlock with --vips-leak
...
We were usingh a global lock for metadata changes, but some functions
triggered from callbacks in the metadata hash table could also attempt
to acquire the same mutex, leading to deadlock.
This patch gives metadata change it's own lock. Thanks DarthSim.
See https://github.com/libvips/libvips/issues/1542
2020-01-31 15:25:05 +00:00
John Cupitt
4aeedd9711
add "nearest" region shrink
2020-01-30 16:53:18 +00:00
John Cupitt
165a3a3855
Merge branch '8.9'
2020-01-28 13:36:46 +00:00
John Cupitt
f8c7f9dac9
interpret \ as an escape char in break_token
...
So:
vips_break_token( "hello\ world", " " )
Sees a single token, `"hello world"`.
This means you can now do things like:
$ vips arrayjoin "k\ 2.jpg" x.png
Where "k 2.jpg" is a filename containing a space.
See https://github.com/libvips/libvips/issues/1493
2020-01-26 13:59:04 +00:00
John Cupitt
c14d7c254b
add max and min to region_shrink
...
Add max and min to region_shrink. Useful with tiffsave and dzsave when
the image is (for example) line art. Thanks rgluskin.
See: https://github.com/libvips/libvips/issues/1490
2020-01-24 17:55:11 +00:00
John Cupitt
fda5e5c402
lock for metadata changes
...
Another attempt at fixing crashes on metadata chenage in highly threaded
applications.
Global lock around set, remove and copy metadata. This is crude, but
simple, the performance impact should be small, and ought to resolve the
problem.
We'll do something better for the next version.
see https://github.com/lovell/sharp/issues/1986
2020-01-21 08:29:59 +00:00
John Cupitt
3862b636e4
remove some dbg code
...
accidentally left in, thanks Kleis
2020-01-10 05:03:48 +00:00
John Cupitt
51fc2ff64e
don't use new source API for new_from_file etc.
...
We were attempting to load images in new_from_file using the new source
API first, then only falling back to the file loaders if that failed.
However, this meant that we did not respect the priority ordering on
loaders, so openslide iamges (for example) were being loaded by the tiff
loader.
2020-01-09 14:47:14 +00:00
John Cupitt
b2334d8d62
Merge branch 'rename-stream'
2020-01-01 12:06:22 +00:00
Denis Fondras
837ca2e044
Fix crash on backward memcpy()
...
In some environment, building fails because of backward memcpy().
2019-12-30 18:29:36 +01:00
John Cupitt
3847f71c54
rename bufis as well
2019-12-30 16:57:19 +00:00
John Cupitt
96cdc5ef01
revise docs for source / target
2019-12-30 16:28:39 +00:00
John Cupitt
63d54e5df2
final code cleanups after stream -> source rename
2019-12-30 14:23:51 +00:00
John Cupitt
119dd2cb72
pytest passes again after stream -> source/target
2019-12-29 23:08:33 +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
John Cupitt
c65e399c48
win32 patches
...
see https://github.com/libvips/libvips/issues/1494#issuecomment-569495472
2019-12-29 12:19:58 +00:00
John Cupitt
9c6bfc7462
better error handling in vips__seek
...
Now that we are using the poxis API on win32, we don't need to check
GetLastError()
2019-12-28 12:54:44 +00:00
John Cupitt
32d3ba2a50
fix vips__ftruncate
...
We'd forgotton to update this for the new vips__seek return.
See https://github.com/libvips/libvips/issues/1494#issuecomment-569413267
2019-12-28 12:47:50 +00:00
John Cupitt
d89df1661a
revise doc comments in bufis
2019-12-26 12:25:19 +00:00