Commit Graph

114 Commits

Author SHA1 Message Date
Kleis Auke Wolthuizen
3ed50e0427 Cleanup configure.ac and #ifdef's 2021-03-06 15:47:07 +01:00
John Cupitt
a1505c6f72 add stdin, stdout to vipsthumbnail
eg.

	vipsthumbnail stdin[page=2] -o .jpg[Q=90]

mirror of syntax in new_from_file etc.
2020-10-02 16:46:03 +01:00
Uwe Ohse
433e35ebbb deprecate unused option --delete 2020-02-29 15:50:01 +00:00
John Cupitt
559ae542ac revise flags for vipsthumbnail
The --rotate flag no longer did anything, so add a new --no-rotate flag
connected to the new no-rotate property. --rotate is still there, but
hidden and does nothing.

-o was much easier to remember than -f, so flip back to -o. -f still
works, but is a hidden synonym.

--iprofile, --eprofile were hard to remember. Add --import-profile and
--export-profile synonyms. iprofile / eprofile are still there and still
work, but are hidden.
2020-02-03 14:49:21 +00:00
John Cupitt
5ec1d5b72f fix vipsthumbnail --size Nx
oh dear, width but not height size specs to vipsthumbnail were not working

thanks jrochkind

see https://github.com/jcupitt/libvips/issues/781
2017-10-23 22:27:23 +01:00
John Cupitt
5a37d3e809 add an intent option to thumbnail
"intent" lets you set the rendering intent for any ICC conversions --
the default is the (more correct) relative, but "perceptual" can look
better

see https://github.com/jcupitt/libvips/issues/714
2017-08-30 16:34:46 +01:00
John Cupitt
260180197d done! but needs some tests 2017-05-04 14:54:49 +01:00
John Cupitt
27e6c60967 add vipsthumbnail page 2017-03-31 13:26:25 +01:00
John Cupitt
49d51e4eb6 fix a compiler wanring
thank you clang
2017-03-25 16:10:30 +00:00
John Cupitt
e6bbfe4672 more centos5 fixes
can't use GRegexp if we need to support centos5 ... vipsthumbnail was
using it to parse geometry strings

new geo parser, plus some tests

see https://github.com/jcupitt/libvips/issues/622
2017-03-15 12:08:52 +00:00
John Cupitt
9e6832b34d add --smartcrop to vipsthumbnail
does the obvious thing
2017-03-08 14:31:00 +00:00
John Cupitt
fb88d037fc Merge branch 'master' into add-thumbnail-geometry 2017-01-17 11:51:10 +00:00
John Cupitt
c5e675f7db fix --vips-cache-max etc.
--vips-cache-max, --vips-cache-max-memory and --vips-cache-max-files were not
working and probably hadn't been for a while

vipsthumbnail.c turns off the operation cache, it's not useful for
the same operation repeated across many files
2017-01-10 14:12:24 +00:00
John Cupitt
ec79682215 small fixes 2017-01-06 14:01:55 +00:00
John Cupitt
2fa3736722 all done, I think 2017-01-06 13:43:43 +00:00
John Cupitt
e958de7814 add geo strings 2017-01-05 15:02:29 +00:00
John Cupitt
2be0b97dce switch to g_warning()_/g_info()
we had vips_warn() and vips_info(), but they are a bit crappy ... switch
to g_warning() and g_info() instead

see https://github.com/jcupitt/libvips/issues/544
2017-01-03 15:52:27 +00:00
John Cupitt
6bff578fd9 remove old thumbnail code
and test thumbnail_buffer
2016-11-02 14:24:18 +00:00
John Cupitt
3f1f950bff add vips_image_hasalpha() 2016-10-31 11:14:27 +00:00
John Cupitt
d3cafb3a9f seems to work
add @centre option for downsampling, see

https://github.com/jcupitt/libvips/issues/504
2016-09-10 10:31:33 +01:00
John Cupitt
57e1423d57 Merge branch 'master' into windows-unicode 2016-09-05 13:12:06 +01:00
John Cupitt
030921efc6 make all tools unicode-aware on windows
sigh
2016-08-17 12:14:43 +01:00
John Cupitt
feca00958c seems to be sort-of working! 2016-08-16 18:33:48 +01:00
John Cupitt
eb49347abb start adding better filename handling 2016-08-16 16:22:38 +01:00
John Cupitt
1f403a4add first attempt
seems to all work, test it a bit more

see https://github.com/jcupitt/libvips/issues/491
2016-08-15 15:45:26 +01:00
John Cupitt
595f18cf64 tiny speedup for vipsthumbnail --linear
use scrgb for working space in vipsthumbnail, was xyz
2016-08-01 08:43:53 +01:00
John Cupitt
dbbd2850a1 better max_alpha default
it used to default to 255, now it sniff the interpretation and defaults to
65535 for RGB16 and GREY16

see https://github.com/jcupitt/libvips/issues/449
2016-05-23 12:18:39 +01:00
John Cupitt
54d8e4808f restore bandfmt after unpremultiply in thumbnail
vips_unpremultiply() always outputs float. If you save the output of
vipsthumbnail to a format that supports float files, like tiff, it won't
ever get cast back to the source format.

Example:

	$ vipsheader Opera-icon-high-res.png
	Opera-icon-high-res.png: 3056x3325 uchar, 4 bands, srgb, pngload
	$ vipsthumbnail Opera-icon-high-res.png -o x.tif
	$ vipsheader x.tif
	x.tif: 117x128 float, 4 bands, scrgb, tiffload

This change makes it note and restore BandFmt aropund pre/unpremultiply.

See https://github.com/jcupitt/libvips/issues/447
2016-05-16 13:18:59 +01:00
John Cupitt
2c646a02e4 better jpeg autorot
jpeg write is more careful about removing exif tags that have been
removed from the image metadata

it failed previously if there were multiple Orientation tags
2016-04-13 08:39:29 +01:00
John Cupitt
8fb146029c more tuning of vipsthumbnail
leave at least a factor of two after shrink-on-load

helps hide aliasing
2016-04-02 20:09:30 +01:00
John Cupitt
bc320f1090 much better int mask creation
removes some banding from the orc path for reducev
2016-04-02 18:46:10 +01:00
John Cupitt
5f24468dba tiny code cleanup, note a bug 2016-04-02 11:25:27 +01:00
John Cupitt
1a25c7a083 better rounding in vipsthumbnail 2016-03-25 10:42:21 +00:00
John Cupitt
ff88087a28 try making the reduce mask larger with residual 2016-03-15 14:59:59 +00:00
John Cupitt
45c3fea6ac more resize tuning 2016-03-15 09:49:30 +00:00
John Cupitt
ac4e5ce059 return of shrink-less-affine-more
though a bit less extreme
2016-03-14 14:58:02 +00:00
John Cupitt
fba2ac2f85 fix sizing issues with new reduce code
a couple of bugs and some changed conventions
2016-03-13 17:44:24 +00:00
John Cupitt
4974a1ed9c better rounding for vips_resize()
we were getting off by one size errors
2016-03-10 19:53:05 +00:00
John Cupitt
d351e07a6b finish up 2016-03-10 17:33:34 +00:00
John Cupitt
ad7ddc4f24 more vips_resize() tuning
now we have better tuning for the anti-alias blur, we can increase the
amount we shrink by and reduce the amount we affine by

this gives a noticable speedup
2016-03-01 11:19:30 +00:00
John Cupitt
19a838470b add webp shrink-on-load
and vipsthumbnail knows about it too

see https://github.com/jcupitt/libvips/issues/398
2016-02-28 14:36:21 +00:00
John Cupitt
153886d2eb add svgload
load from bubffer is not working though, strange ... it seems to be
generating a 16-biit image?
2016-02-09 11:01:12 +00:00
John Cupitt
625e0fbd9e vipsthumbnail knows about pdfload
woo, fast!
2016-02-09 09:26:54 +00:00
John Cupitt
8506ff13a6 try to improve vips_resize() quality
small improvements to vips_resize() quality:

* turn down the anti-alias filter a little so we don't smudge out texture
* don't do the final sharpening pass if we skipped the anti-alias filter
* fix a >/>= mixup which meant we didn't sharpen for small resizes
2015-11-19 15:22:23 +00:00
John Cupitt
63d61416e4 warn if autorot + no exif
warn if you use the --rotate option to vipsthumbnail but vips has been
built without libexif

see https://github.com/jcupitt/libvips/issues/319
2015-07-30 11:32: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
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
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
9be2d6cc8d improve vipsthumbnail with broken images
if there was an incorrect embedded profile, no fallback import profile,
and an export profile, vipsthumbnail could crash

see https://github.com/jcupitt/libvips/issues/186
2014-11-28 17:54:01 +00:00