bimg icon indicating copy to clipboard operation
bimg copied to clipboard

vips_watermark failed when input image has 4 bands

Open sanlee42 opened this issue 7 years ago • 8 comments

If input image is png(which has the alpha channel), watermark will be failed. The error msg is ifthenelse: not one band or 4 bands. Does it means watermark only support for the input image with 3 bands?

sanlee42 avatar Aug 21 '17 08:08 sanlee42

To fix it, one have to make the compositing manually.

  • https://github.com/jcupitt/libvips/issues/657

greut avatar Aug 26 '17 13:08 greut

Hi! Is there any news on that? I am really waiting for the fix.

yehor-manzhula avatar Sep 20 '17 15:09 yehor-manzhula

@egor-manjula what do you mean by waiting for the fix?

My best guess is that you either have to make it yourself by doing the composition manually, or finding someone able to do so and negociate how many 🍻 or 🍭 they would ask for their trouble.

greut avatar Sep 20 '17 19:09 greut

@greut I am really newbie into go lang, just start learning it. I've tried ti find out on what is wrong in the code but failed with that. Coukd you please send me some example on nanual composition or at list send a link, or point ot lines number if they are already exists somewhere.

yehor-manzhula avatar Sep 21 '17 04:09 yehor-manzhula

The option one seems out of reach then.

greut avatar Sep 21 '17 14:09 greut

@yehor-manzhula were you able to sole this issue?

timotew avatar Apr 16 '20 21:04 timotew

@timotew Nope.

yehor-manzhula avatar Apr 17 '20 07:04 yehor-manzhula

I converted the image to JPEG fist before adding watermark was the bypass I used.

timotew avatar Apr 17 '20 09:04 timotew