Commit Graph

19 Commits

Author SHA1 Message Date
Kleis Auke Wolthuizen 0629a5de7f
Ensure consistent formatting of `->format_table` (#3199) 2022-11-30 09:41:05 +00:00
John Cupitt e3289ad2c1
add exif support to png load/save (#3168)
* start adding exif in png

the "Exif\0\0" header isn't being added and removed correctly

needs tests

* all done

tested with linpng and libspng
2022-11-18 11:57:05 +00:00
Sergey Alexandrovich 982a835eed
spngsave: Don't shift indexed pixels (#3101) 2022-10-19 17:34:43 +01:00
Sergey Alexandrovich c6498e5c2c
spngsave: fix transparency (#3074) 2022-10-14 20:05:29 +01:00
Kleis Auke Wolthuizen f38acdef1a
spngsave: ensure quantisation occurs last (#3073)
* spngsave: ensure quantisation occurs last

i.e. after setting the metadata and phyiscal pixel dimensions,
since quantisation will overwrite the image.

* spngsave: avoid over-allocation of temporary buffer

For low-bitdepth write and palette-based output.
2022-10-14 19:29:29 +01:00
Lovell Fuller d3a1d4df1b
spngsave: name ICC profiles (#3068)
The PNG spec requires that the iCCP chunk has a profile name with
a minumum length of 1 (we use the same "icc" name as pngsave).
2022-09-28 16:28:44 +01:00
Lovell Fuller b58b7bd416
pngsave: ensure 8-bit palette images can be created (#3031) 2022-09-08 09:10:02 +01:00
John Cupitt 99e6bb833e ooops 2022-08-14 16:29:00 +01:00
John Cupitt 1989203985 fix low bitdepth PNG save of high bitdepth images
SOme combinations of high bitdepth images with low bitdepth PNG save could
produce incorrect images, for example saving a 16-bit fourier image as 1-bit.
2022-08-14 12:14:55 +01:00
John Cupitt ca2796aa7f fix low-bitdepth spng save
There was a missing shift, thanks jeffska

See https://github.com/libvips/libvips/issues/2985
2022-08-14 10:26:24 +01:00
Lovell Fuller 1bf1a32f2c
pngsave: Change default row filter from 'all' to 'none' (#2929)
as this is usually faster and produces a smaller file size
2022-07-15 19:20:42 +01:00
John Cupitt 2af2ca5ca2 add note about palette sorting by quantisers 2022-05-26 17:41:51 +01:00
Kleis Auke Wolthuizen 550781cd18
spngsave: fix 8bpp palette save with transparency (#2808) 2022-05-26 17:26:26 +01:00
John Cupitt 7d3aaf540c small formatting 2022-05-23 12:42:26 +01:00
John Cupitt 047bef50d9 fix spngsave conversion
It was all mixed up. We don't need to call colourspace -- this is done
for us by the SAVEABLE system.

Fixes "vips identity x.png" error, see:

https://github.com/libvips/libvips/pull/2808#issuecomment-1133947162
2022-05-23 11:51:54 +01:00
John Cupitt 58b53506ff
add vips_target_end (#2802)
since finish did not return an error code

also make sure we don't call target_end from inside _dispose, since that
can't signal error either

see https://github.com/libvips/libvips/issues/2801
2022-05-20 16:38:04 +01:00
Kleis Auke Wolthuizen 6aca41d713
quantise: fix styling (#2807)
Also, use the correct conditional directive in spngsave.
2022-05-20 14:31:16 +01:00
Kleis Auke Wolthuizen 0337c09700
Cleanup gettext handling (#2695)
Use GLib's i18n support instead of copying and pasting that
logic into its own header. This deprecates the vips/intl.h
header in favour of glib/gi18n.h.
2022-02-27 15:27:28 +00:00
John Cupitt 896cad6a7a
Add spngsave (#2536)
* quick hack

won't even compile

* works!

at a basic level, anyway

* start wiring up metadata

* metadata done

* add spng interlaced save

* start adding index support

* fix palette save

* Update libvips/foreign/spngsave.c

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>

* start adding low bit depth write

* add a warning for low bitdepth write

* small fixes

* add 1/2/4 bit write

adapted from the vips2tiff bit packer

* small polish

* note spngsave in changelog

* Update libvips/foreign/spngsave.c

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>

* Update libvips/foreign/spngsave.c

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>

* revise 8 and 16-bit PNG write rules

* cleanup

* remove unnecessary palette filter optimisation

since libspng already does this

* add xres/yres rounding

thanks klies

he commit message for your changes. Lines starting

* look for spng.pc and libspng.pc

It can be called either, frustratingly.

* fix PACKAGES_USED for spng .pc changes

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
2022-02-11 16:30:23 +00:00