showcode icon indicating copy to clipboard operation
showcode copied to clipboard

(API) Transparent Background Not Actually Transparent

Open recursivecodes opened this issue 11 months ago • 3 comments

When generating an image via the API, the resulting PNG image is not truly transparent.

Would also be nice to have an option to pass a custom color hex code. If I can't get a true transparent, would at least like a nice plain solid color like white.

recursivecodes avatar Feb 14 '25 16:02 recursivecodes

Honestly, I'd also be OK with an option to have no background.

recursivecodes avatar Feb 14 '25 16:02 recursivecodes

I'm able to reproduce this thanks! Transparent is supposed to be no background. Will see what I can do 👍

stevebauman avatar Feb 15 '25 20:02 stevebauman

Hi! I faced this too

I guess it's fixable by changing "opacity" on line 9. Also the backgroundImage seems redundant.

https://github.com/stevebauman/showcode/blob/6c2479adebf4f3fa41b29ea5915c7889cf6d02f0/data/backgrounds.js#L7-L17

But I'm not sure how it works on the API backend, I can't find any API backend code in this repo.

mahenzon avatar May 20 '25 11:05 mahenzon