-
I am using The final destination is to pass as an argument to the I have discovered I can use
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @jrochkind, In python it's just: if image.hasalpha():
image = image.flatten() Ruby is something like: image = image.flatten if image.has_alpha? The libvips CLI is deliberately very basic. The idea was that anything fancy should be done in a proper scripting language anyway, so there's no point implementing a complete CLI environment. It's much better to make the library easy to bind to, and then pass the programming on to some other system. libvips will flatten automatically if the destination format does not support alpha, but you're right, there's no way to force a flatten. You can
Or even:
|
Beta Was this translation helpful? Give feedback.
Hi @jrochkind,
In python it's just:
Ruby is something like:
The libvips CLI is deliberately very basic. The idea was that anything fancy should be done in a proper scripting language anyway, so there's no point implementing a complete CLI environment. It's much better to make the library easy to bind to, and then pass the programming on to some other system.
libvips will flatten automatically if the destination format does not support alpha, but you're right, there's no way to force a flatten.
You can
vipsthumbnail
to a pipe with eg.:Or even: