ruby-vips icon indicating copy to clipboard operation
ruby-vips copied to clipboard

How to use pngsave's filter option (Vips::ForeignPngFilter)

Open jcupitt opened this issue 2 years ago • 1 comments

Discussed in https://github.com/libvips/ruby-vips/discussions/358

Originally posted by tonymarklove January 25, 2023 After digging into the ruby-vips code I can't see anywhere that Vips::ForeignPngFilter is defined.

After some investigation it appears that the PNG saving functions in Ruby accept the values as defined in the C enum eg.

image.pngsave('file.png', filter: 0xF8)

Am I missing a simpler way to do this? Or are these filter constants missing from ruby-vips?

jcupitt avatar Jan 28 '23 18:01 jcupitt

See discussion for possible API.

jcupitt avatar Jan 28 '23 18:01 jcupitt