
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
- 404 errors after 7 Days
Local hosted Appwrite via docker. Last version and current version. After exactly 7 days Appwrite stops working. I get 404 route not found, cannot access anyth...
- unable to modify attribute
please help: when I try to modify attribute size or key or anything, I am getting this errors: ``` Deprecated: strtolower(): Passing null to parameter #1 ($str...
- Error 1.7.4 console team no found
In console when i go to auth, select user, select a membership the url not work. Only work searching the team. It is by the region. project-default- and i get ...
