Replies: 1 comment
-
Wait - could it be related to this?: #624 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all - a little perplexed, but I'm trying to reposition an image using copyExpandCanvas. My goal is to add transparent space around a transparent background PNG to make it center horizontially, and about 1/3 vertically. But what I'm finding is that copyExpandCanvas is adding pixels which are not transparent (alpha:0). I tried to explicitly add
backgroundColor: img.ColorRgba8(255, 255, 255, 0)
but that doesn't help either. Also, when I useImageGallerySaver.saveImage
, it saves as a jpg and not a png?My code (pardon how verbose it is) is as follows:
This is the image I put in:

And here is how it outputs:

Additionally, when I use

backgroundColor: img.ColorRgba8(0, 0, 0, 0)
, I get the following - it's not a transparent background:I want the background to remain as transparent. Your help is greatly appreciated!
Cheers
Beta Was this translation helpful? Give feedback.
All reactions