Commit Graph

1259 Commits

Author SHA1 Message Date
John Cupitt dbd852211e move bytw swapping out to vips_byteswap()
it was an option to vips_copy(), ugly!
2015-06-05 13:56:26 +01:00
John Cupitt 5cb2239d7d try to support DOS ppm/csv files on linux
swap \r\n for \n in vips__fgetc()
2015-06-04 12:58:30 +01:00
John Cupitt a3c881ae78 support "with Vips.Image" in Python
though it doesn't actually do anything, it looks nice
2015-06-03 15:08:02 +01:00
John Cupitt c35e2e5427 add RefString getter
to python now unpacks VipsRefString on get_value()
2015-06-02 13:32:48 +01:00
John Cupitt baf78fc04a oops, fix base64 encode/decode padding
we were adding up to two bytes of null to the end of base64-encoded
binary data due to a signed/unsigned mixup

add a test for this, plus a test for vips file format
2015-05-31 18:17:26 +01:00
John Cupitt 36331739ab add bandand() bandor() bandeor() to py
convenience funcs
2015-05-26 10:32:15 +01:00
John Cupitt cea1e29527 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	ChangeLog
	configure.ac
	doc/libvips-docs.xml
2015-05-24 18:19:32 +01:00
John Cupitt 3451766004 fix dzsave/vips2tiff for some image sizes
we were not clipping new strip size against image size, see

https://github.com/jcupitt/libvips/issues/300
2015-05-24 17:53:05 +01:00
John Cupitt 045678d438 vips_copy() can turn bands into width
handy for slicing up very large 3D arrays
2015-05-15 14:24:53 +01:00
John Cupitt 25bf910f21 vipsthumbnail uses vips_premultiply() 2015-05-09 16:33:38 +01:00
John Cupitt 9ea012f737 vipsthumbnail now uses vips_resize()
it used to have its own copy of this code
2015-05-09 12:54:50 +01:00
John Cupitt ec52d1b922 change vips_flatten() alpha rules
now match vips_premultiply()

add tests

foreign knows about new logic
2015-05-09 12:10:42 +01:00
John Cupitt 472bf7dbc3 add vips_unpremultiply() 2015-05-08 10:26:23 +01:00
John Cupitt 90a47b0cad start 8.1 2015-05-07 18:15:07 +01:00
John Cupitt 5f3d4c7971 start 8.0 supported branch 2015-05-07 18:11:57 +01:00
John Cupitt 8ba680605a soname bump, test suite improvements
test suite now tests load from buffer and save to buffer

test suite adapts for differences in newer libMagick

bump soname for safety
2015-05-05 09:40:29 +01:00
John Cupitt db4ee8d6b6 fix a ref leak in the C++ API
see https://github.com/jcupitt/libvips/issues/290

thanks huskier

added a write-to-buffer example as well
2015-05-04 19:44:56 +01:00
John Cupitt bfeeb3eb27 better leak reporting
Vips::print_all now shows VipsArea leaks as well
2015-05-01 16:42:23 +01:00
John Cupitt f5a77dd80d start some notes on threading 2015-04-27 10:57:27 +01:00
John Cupitt ffdd9ff851 init glib langs on startup
works around a crash under heavy load, see

https://github.com/openslide/openslide/issues/161
2015-04-26 10:30:39 +01:00
John Cupitt 6c6d0d6b78 fix some compiler warnings 2015-04-25 17:39:16 +01:00
John Cupitt ad017dc56f add more C++ convenience functions
flipver() etc.
2015-04-24 10:10:44 +01:00
John Cupitt e0a5d28100 add vips_vipsload() vips_vipssave() to C API
we didn't have these in the C API before, for some reason
2015-04-21 14:29:44 +01:00
John Cupitt fcb348db64 notes on recent changes 2015-04-19 13:15:24 +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 a0aacad871 much better convert to greyscale
mix RGB channels as .2, .7, .1 in linear light

see https://github.com/jcupitt/libvips/issues/266
2015-04-17 11:33:27 +01:00
John Cupitt 41b38f2fd2 Merge remote-tracking branch 'origin/7.42'
Conflicts:
	ChangeLog
	configure.ac
	libvips/foreign/vips2tiff.c
2015-04-09 09:49:59 +01:00
John Cupitt da1611e070 add miniswhite tiffsave option 2015-03-27 10:07:59 +00:00
John Cupitt 09b81b7580 im_maxpos_avg() avoids NaN 2015-03-26 17:16:52 +00:00
John Cupitt 9552315e80 version bump 2015-03-26 08:46:52 +00:00
John Cupitt c4672f389b oops in vips_getpoint() C wrapper 2015-03-08 15:13:56 +00:00
John Cupitt 339f268200 add some API for args, fix a docs messup 2015-03-02 22:02:33 +00:00
John Cupitt ded01df512 c++: add [], change ()
() used to return element zero, just return a vector

add [] overload
2015-03-01 10:43:02 +00:00
John Cupitt 5d912fdbbb add [] overload to python
index and slice image bands
2015-02-28 16:53:06 +00:00
John Cupitt a49e6772fd notes 2015-02-27 11:54:18 +00:00
John Cupitt fc5a4a917a make file format readers close fds early
we were using two fds per open image, now we just use one

jpg, magick, tiff, png
2015-02-26 14:09:01 +00:00
John Cupitt ed5c90175a final cleanup 2015-02-17 14:45:39 +00:00
John Cupitt 377075fe05 Merge branch 'new-tiff-save' of github.com:jcupitt/libvips into new-tiff-save
Conflicts:
	ChangeLog
	libvips/foreign/vips2tiff.c
2015-02-16 21:27:00 +00:00
John Cupitt c15f37719b add test_foreign.py
plus some more test images
2015-02-16 16:03:39 +00:00
John Cupitt 99b4bcb838 small cleanups
split magicload up into a base class plus file and buffer subclasses

magickload_buffer should do all reading in header method
2015-02-16 10:45:56 +00:00
John Cupitt 187a12987a add vips_region_shrink()
add fast x2 region shrink

aim to share between pyramid builders
2015-02-14 13:44:32 +00:00
John Cupitt be5052d0c3 tiff pyramid builder no longer copies base image
we used to make a copy of the base image ... instead, write once and
append other layers at end of run
2015-02-13 13:40:35 +00:00
John Cupitt 4d9436f4b3 Merge branch '7.42' 2015-02-13 12:21:46 +00:00
John Cupitt 4d0887f5de fix .dz as a target
and add a test for this as well
2015-02-13 11:17:55 +00:00
John Cupitt 8f7c2c7110 sort out alpha going to and from 16-bit
rewritten sRGB <-> scRGB so that 16-bit alpha is scaled to float 8
2015-02-12 17:50:38 +00:00
John Cupitt 244ab301f7 start final push for vips 8 2015-02-11 17:01:02 +00:00
John Cupitt 5b90e36559 notes 2015-02-10 14:44:35 +00:00
John Cupitt 346a9e70c0 remove --disable-cxx flag
it was getting too hard to support :( automake now generates libtool
lines before configure runs, so it can't know we don't want a C++ link

see https://github.com/jcupitt/libvips/issues/231
2015-02-07 10:37:13 +00:00
John Cupitt 3d902d2feb improvements to python configure 2015-02-06 14:54:52 +00:00
John Cupitt 9d11c02e35 version bump 2015-02-06 13:39:39 +00:00
John Cupitt d6dbfea064 much faster RGB16 -> sRGB path 2015-02-04 16:48:25 +00:00
John Cupitt 0c466b9495 don't use isnormal() to test for crazy FP numbers
it fails for 0.0 and for subnormal numbers, thanks Murat Korkmazov
2015-02-04 15:13:11 +00:00
John Cupitt e429772ae8 turn on leak testing in python test suite 2015-02-02 11:36:29 +00:00
John Cupitt eb5fee5e65 add lower-level cache access 2015-02-01 17:56:48 +00:00
John Cupitt ce557ba6de add VInterpolate wrapper class
to cplusplus, see https://github.com/jcupitt/libvips/issues/230
2015-01-30 21:19:58 +00:00
John Cupitt e8f456a7e2 more tests 2015-01-27 21:45:14 +00:00
John Cupitt 70b60e1dd5 tiny cleanup 2015-01-22 13:19:21 +00:00
John Cupitt 229636fc66 rename vipsthumbnail -o as -f
-o stays as a hidden flag

see https://github.com/jcupitt/libvips/issues/216
2015-01-20 09:10:36 +00:00
John Cupitt 23071d73ac Merge branch 'master' of github.com:jcupitt/libvips
Conflicts:
	ChangeLog
2015-01-19 22:03:05 +00:00
John Cupitt dbd98ba86c disable chroma subsample in jpeg-tiff if Q>=90
see https://github.com/jcupitt/libvips/issues/218
2015-01-19 22:01:13 +00:00
John Cupitt f1d901a229 try to handle tiffs with 8-bit colormaps
see

https://github.com/jcupitt/libvips/issues/220
2015-01-19 14:52:57 +00:00
John Cupitt c805b382fe vipsthumbnail sets an error on failure
conversion errors are ignored as before, but on final exit vipsthumbnail will
return an error code if one or more of the conversions failed

see https://github.com/jcupitt/libvips/issues/219
2015-01-13 17:31:09 +00:00
John Cupitt eda4ed64f1 rename _!PIXEL etc. to help bindings
ruby gobject-introspection hates numbers at the start of _ separated
names
2015-01-07 14:22:13 +00:00
John Cupitt 6f101ae86b remove VImage::scale()
it clashed with the VipsScale operator, see

https://github.com/jcupitt/libvips/pull/213
2015-01-06 12:00:11 +00:00
John Cupitt 6440830315 required C++ output params were broken
see https://github.com/jcupitt/libvips/pull/213

this now works:

        VImage rows;
	VImage cols = in.profile( &rows );
2015-01-06 11:51:53 +00:00
John Cupitt 90725b9f5e more tests 2015-01-05 13:48:35 +00:00
John Cupitt 6c35ae5540 display default and range in usage
eg. we now see:

$ vips gamma
gamma an image
usage:
   gamma in out
where:
   in           - Input image, input VipsImage
   out          - Output image, output VipsImage
optional arguments:
   exponent     - Gamma factor, input gdouble
  			default: 2.4
			min: 1e-06, max: 1000
operation flags: sequential-unbuffered
2014-12-30 13:16:22 +00:00
John Cupitt 32625146db cpp can set enums from strings
eg.

	set("extend", "copy")->
2014-12-30 11:27:04 +00:00
John Cupitt d077d7c1fc small stuff 2014-12-27 10:00:01 +00:00
John Cupitt b01dd59309 fix VipsBlob read
oops, forgot the .get()
2014-12-27 09:41:01 +00:00
John Cupitt 366e7e3a5e add gobject to Requires: line
vips C and C++ programs can link directly against things in gobject
without appearing to, for example:

	a = VIPS_OBJECT( b );

the macro will expand to include a g_type_check_instance_is_a(). So we
have to have gobject-2.0 in the link line of things like:

	g++ -g -Wall hello8.cc `pkg-config vips-cpp --cflags --libs`

see also

	https://github.com/jcupitt/libvips/issues/196
2014-12-24 10:10:14 +00:00
John Cupitt 1b86de44f4 "make check" works uninstalled
and skips tests for missing features
2014-12-22 10:35:26 +00:00
John Cupitt abdd98409d add configure option for pyvips8
it tests for pygobject as well
2014-12-18 09:15:58 +00:00
John Cupitt 6e2135d8b5 mask builders take prec, not integer
vips_gaussmat() and vips_logmat() used to default to float, but
vips_conv() defaulted to int ... so this failed:

	vips gaussmat m.v 2 0.1 --separable
	vips convsep k2.jpg x.jpg m.v

since we were using a small float mask with an integer convolution

This change makes everything int by default, with gaussmat having a new
param called --precision whose arg can be int or float.

The old @integer param is deprecated.
2014-12-16 20:48:11 +00:00
John Cupitt c3102b15bb add python3 support 2014-12-10 17:02:51 +00:00
John Cupitt 76653e9e78 add notes to logs for @density 2014-12-04 21:47:46 +00:00
John Cupitt f8cca8e59d load and save XMP metadata in tiff
see https://github.com/jcupitt/libvips/issues/198
2014-12-03 09:03:09 +00:00
John Cupitt ffe90ef38a add .szi as a synonym for .zip
in dzsave
2014-11-26 14:26:57 +00:00
John Cupitt 4c3461967b duuh fix up misplaced patch 2014-11-25 12:05:04 +00:00
John Cupitt 6bfe9b45b7 Merge branch '7.40' 2014-11-25 12:04:24 +00:00
John Cupitt f66afb78da fix profile handling in XYZ2scRGB
see

https://github.com/lovell/sharp/issues/125
2014-11-25 12:01:13 +00:00
John Cupitt 4b51a9d61f don't strip profiles in XYZ2scRGB
see

https://github.com/lovell/sharp/issues/125
2014-11-25 11:43:48 +00:00
John Cupitt 384a5e05dc change parameters of vips_gaussblur()
sorry :-(

The old param (passing sigma*2 as an int) were just too confusing
coming from other packages. This new behaviour matches ImageMagick, and
almost everyone else in the world.

A new optional param lets you set the minimum amplitude as well.
2014-11-19 12:27:26 +00:00
John Cupitt f16e252b3e Merge branch '7.40' 2014-11-11 20:43:19 +00:00
John Cupitt 8a44d6f7b3 fix memleak in sharpen
see https://github.com/jcupitt/libvips/issues/194
2014-11-11 20:42:26 +00:00
John Cupitt cce90b4fba add pbm save
previously vips could load but not save pbm (one bit) images

fix a few bugs in float load and save as well, and improve one-bit load
2014-11-08 17:40:43 +00:00
John Cupitt cfcd819246 better default resolution for png load
see

https://github.com/lovell/sharp/issues/96
2014-11-04 09:38:21 +00:00
John Cupitt 63469b1c9d merge new C++ API 2014-11-03 09:07:28 +00:00
John Cupitt c56e23e3c2 Merge remote-tracking branch 'origin/7.40'
Conflicts:
	ChangeLog
	configure.ac
2014-10-27 13:47:17 +00:00
John Cupitt 965936307b better bigtiff detection
update Changelog and bump version
2014-10-27 13:45:45 +00:00
John Cupitt 620bff2d78 allow symbolic names for flags
you can now use numbers or names for GFlags values, eg.:

$ vips copy 50020484-00001.png x.png[filter=avg]
$ vips copy 50020484-00001.png x.png[filter=64]

was numbers only before
2014-10-27 11:40:43 +00:00
John Cupitt ad86f45cd9 add autorot as an operator as well 2014-10-19 10:35:10 +01:00
John Cupitt 0a51536162 seems to work 2014-10-17 13:17:44 +01:00
John Cupitt 3d4eecf921 add vips8 plugin support 2014-10-09 12:50:16 +01:00
John Cupitt 5683c3095c Merge remote-tracking branch 'origin/master' into update-cimg 2014-10-08 17:51:40 +01:00
John Cupitt 927b2d7954 remove cimg and gmic
move this to a plugin, it's too big for the core library
2014-10-08 17:51:07 +01:00
John Cupitt bf65a024b6 Merge remote-tracking branch 'origin/7.40'
Conflicts:
	ChangeLog
2014-10-08 13:12:44 +01:00
John Cupitt 9069b2f9ad improve interpretation of maplut output
a mono image though a colour lut needs to take the lut's interpretation
2014-10-08 12:31:36 +01:00
John Cupitt 5225d70438 Merge branch '7.40'
Conflicts:
	ChangeLog
	configure.ac
	libvips/colour/Lab2LabQ.c
	libvips/colour/Lab2LabS.c
	libvips/colour/LabS2Lab.c
	libvips/colour/LabS2LabQ.c
	libvips/colour/float2rad.c
	libvips/colour/sRGB2scRGB.c
	libvips/colour/scRGB2sRGB.c
2014-10-08 12:01:25 +01:00
John Cupitt aa45c81464 fix extra band handling in colour
backport of new colour.c from 7.41
2014-10-08 11:55:24 +01:00
John Cupitt ca2ae681cd add --with-gmic configure option 2014-10-07 14:54:53 +01:00
John Cupitt 3788c85e54 gmic uses an imagevec for input images 2014-10-06 21:52:27 +01:00
John Cupitt d85c5ef3fd Merge branch '7.40' 2014-09-30 12:14:11 +01:00
John Cupitt cad052544c try to make vips_thread_shutdown() optional
see

https://github.com/jcupitt/ruby-vips/issues/55

it's still better to call vips_thread_shutdown(), but not calling it
should no longer leak memory
2014-09-30 11:28:24 +01:00
John Cupitt 154796a8dc rename VIPS_ANGLE_0 as VIPS_ANGLE_D0
and other similar cases

VIPS_ANGLE_0 becomes Vips.Angle.0 in Python, which is very inconvenient, so we
rename ... the D stands for degrees, I think
2014-09-29 13:56:55 +01:00
John Cupitt 21ae8321f2 Merge branch '7.40'
Conflicts:
	ChangeLog
	configure.ac
2014-09-29 12:37:19 +01:00
John Cupitt b1827128ea icc checks input profile compat
check the input profile colourspaces matches the image ... for example,
if a CMYK image has an embedded RGB profile, fall back to the specified
external profile

see:

https://github.com/jcupitt/libvips/issues/183
2014-09-29 11:04:53 +01:00
John Cupitt f467924156 move ImageProperties.xml
it's now in x/, not x/x/, same as the official tool
2014-09-25 11:16:14 +01:00
John Cupitt fd9300750d test extra band handling in dE 2014-09-24 14:52:24 +01:00
John Cupitt f18fd4b089 Merge branch '7.40' 2014-09-19 11:49:30 +01:00
John Cupitt 862d7f03ea tiny cache clean-up 2014-09-19 11:38:16 +01:00
John Cupitt 36d1312a32 Merge branch '7.40' 2014-09-18 09:41:24 +01:00
John Cupitt 14a8c5ad47 add @profile option to pngsave
tiff and jpeg save both have a @profile option, this patch adds one to png as
well, see

https://github.com/jcupitt/libvips/issues/180
2014-09-18 09:38:12 +01:00
John Cupitt ef847de996 done arithmetic testsuite
all passes, woo
2014-09-17 12:03:06 +01:00
John Cupitt de594151a5 rename NOTEQUAL as NOTEQ
since <= is LESSEQ

python has some relational overloads now
2014-09-16 17:25:20 +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 ca0437d002 Merge branch '7.40' 2014-09-12 12:03:47 +01:00
John Cupitt e4461ae1f9 fix vipsthumbnail with broken embedded profiles
if the embedded profile is broken or incompatible with the specified
output profile, retry with the specified input profile

see

https://github.com/jcupitt/libvips/issues/178
2014-09-12 10:51:49 +01:00
John Cupitt b1f3acf17b fix vipsthumbnail
with input cmyk and output rgb profiles both specified ... it was
importing twice, causing a band mismatch

see

https://github.com/jcupitt/libvips/issues/177
2014-09-12 09:04:58 +01:00
John Cupitt 62a98dbdf7 Merge branch '7.40' 2014-09-11 19:29:09 +01:00
John Cupitt b21c47b1c5 add @background arg to save
used to flatten A out of images, if necessary

vipsthumbnail rtd-img.png -o x.jpg[background=255]
2014-09-11 09:18:38 +01:00
John Cupitt 01bd7cad04 support GRAY as an input and output ICC space
see

https://github.com/jcupitt/libvips/issues/176
2014-09-10 09:37:13 +01:00
John Cupitt 2ec0a8b87e Merge branch '7.40'
Conflicts:
	ChangeLog
	configure.ac
2014-09-09 16:58:28 +01:00
John Cupitt 158237254d fix jfif resunit read
see https://github.com/jcupitt/libvips/issues/170

the previous fix just did exif resolution "none", we need jfif "none" as
well
2014-09-09 16:46:16 +01:00
John Cupitt cb9360dac9 Merge branch '7.40' 2014-09-09 12:19:09 +01:00
John Cupitt 6269c852cc support exif res unit "none"
well why would you want that, but it seems some images use it
2014-09-09 12:18:21 +01:00
John Cupitt 891e6db8f0 Merge branch '7.40' 2014-09-09 11:21:28 +01:00
John Cupitt d085351f0f fix mono <-> rgb converter extra band handling
see

https://github.com/jcupitt/libvips/issues/172

thanks James
2014-09-09 10:07:35 +01:00
John Cupitt b746984318 Merge branch '7.40'
Conflicts:
	ChangeLog
	configure.ac
2014-09-08 19:49:09 +01:00
John Cupitt a8becfc9d4 bump version to 7.40.8 2014-09-08 19:47:01 +01:00
John Cupitt 5ab3009ce2 add thread_shutdown() to python
see https://github.com/jcupitt/libvips/issues/170
2014-09-07 10:21:01 +01:00
John Cupitt e9ce212b62 make out of order read a fatal error
For png and jpg, out of order must always be a fatal error, since you
can't read from a specific y position.

This was a g_assert() before which meant that this test was missing from
production builds. It's now always a fatal error.
2014-09-02 09:37:08 +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 f8f288c1a6 vips_init() comes back
we need a public function for bindings
2014-08-29 13:51:03 +01:00
John Cupitt 43eddbef7a Merge branch '7.40' 2014-08-28 17:19:58 +01:00
John Cupitt 70b35f5ec5 update ChangeLog 2014-08-28 16:44:03 +01:00
John Cupitt 180142b2b1 Merge branch '7.40'
Conflicts:
	ChangeLog
	configure.ac
2014-08-27 14:00:54 +01:00
John Cupitt 86b729150c fix memleak in type.c
see

https://github.com/jcupitt/libvips/pull/164
2014-08-27 13:46:51 +01:00
John Cupitt 30aae507a3 fix memleak in tilecache 2014-08-26 17:07:44 +01:00
John Cupitt a75ddfbd5a fix matlab load
oops, width and height were swapped
2014-08-21 22:01:40 +01:00
John Cupitt 694d86e5c5 fix vipsthumbnail on very-many-core systems
see:

https://github.com/jcupitt/libvips/issues/160

we were using UNBUFFERED, but on very-many-core systems this can get out
of order enough to make vipspng free the read object early
2014-08-21 13:05:29 +01:00
John Cupitt 5125cc535c Merge branch '7.40'
Conflicts:
	TODO
2014-08-19 18:04:24 +01:00
John Cupitt 03577ad832 fix dzsave date attr on Windows
see

https://github.com/jcupitt/libvips/issues/157

thanks John
2014-08-18 21:30:26 +01:00
John Cupitt cb2b217434 fix 16-bit PNG save
see

https://github.com/jcupitt/libvips/issues/156
2014-08-18 13:54:06 +01:00
John Cupitt 2e2809a6b4 Merge remote-tracking branch 'origin/7.40'
Conflicts:
	ChangeLog
2014-08-17 10:00:03 +01:00
John Cupitt c646356b4f Merge branch 'master' of github.com:jcupitt/libvips
Conflicts:
	ChangeLog
	TODO
2014-08-17 09:58:24 +01:00
John Cupitt 0b896119d4 fix similarity rotate + scale
thanks Topochicho

see https://github.com/jcupitt/libvips/issues/154
2014-08-13 17:44:29 +01:00
John Cupitt fe7bd9bdcc add vips_resize()
a wrapper over affine that just scales ... much faster from the
command-line, since it can set SEQ mode
2014-08-13 13:57:52 +01:00
John Cupitt b24cbb492c Merge remote-tracking branch 'origin/7.40'
Conflicts:
	ChangeLog
	TODO
	configure.ac
	libvips/foreign/vipspng.c
2014-08-12 13:41:52 +01:00