
when I set the output to WEBP and the original image is from an PNG. I get an black background what should of been transparent.
When I set the background color to white fore example it does set it to white. Only thing is that I cant set that to transparent either in hex for example: ffffff00 should be transparent. But it does not allow those 2 extra hex codes to allow for transparancy
async function getBucketImage(
imageName,
options = {},
bucketId = process.env.IMAGES_BUCKET_ID
) {
if (imageName.includes(".")) imageName = imageName.split(".")[0];
const imageMeta = (await storage.listFiles(bucketId, [], imageName))
?.files[0];
const result = await storage.getFilePreview(
bucketId, // bucketId
imageMeta.$id,
options.width,
options.height,
options.gravity,
options.quality,
options.borderWidth,
options.borderColor,
options.borderRadius,
options.opacity,
options.rotation,
options.background,
options.output
);
if (imageMeta.name.split(".")[0] !== imageName) {
return null;
}
return { type: imageMeta.mimeType, data: result };
}
Recommended threads
- WebSocket reconnecting issues – Realtime...
Hello! I am experiencing a problem with the Realtime API. My frontend is constantly reconnecting to the WebSocket server, and as a result Realtime is not worki...
- dns issue with custom domain
im getting this, but i can access the appwrite through http://new.theasians.co.uk/console/ which is http but im not getting https, i deployed in vps through hos...
- Help needed on sites and funcions
I have Appwrite 1.7.4 self-hosted on a VPS. If I enable this parameter: `_APP_OPTIONS_ROUTER_FORCE_HTTPS` Functions work perfectly. If I disable it, the sites...
