Unable to add transparent bacground.
Hello, Everyone.
I am trying to remove the background with cloudinary_ai. It is changing the background to white instead of transparent. Also, i have enabled the format to PNG as it was suggested for transparent background. Here is my sample code in nodejs.
______________________________________________
cloudinary.uploader.upload("car-3.jpg",
{ public_id: "car1",
format: "PNG",
background_removal: "cloudinary_ai",
notification_url: "https://mysite.example.com/hooks" },
function(error, result){console.log(result);});
______________________________________________
-
Hi Rana,
I took a look at the image on your account and the background is indeed transparent. Please note that the URL itself has to instruct Cloudinary to deliver the resource with a format that supports transparency, e.g.:
https://res.cloudinary.com/<your_cloud_name>/image/upload/car1.pngDelivering it as a JPG for example (https://res.cloudinary.com/<your_cloud_name>/image/upload/car1.jpg), which doesn't support transparency, will "paint" the background as the default color, which is white (which can be changed to any other color, of course)
If this is still not the case, feel free to open a ticket with us, and we'll be happy to learn more about the issue.
0
Post is closed for comments.
Comments
1 comment