feat(removebg/remove-image-background): update wording

This commit is contained in:
Ali BARIN
2023-11-22 15:00:29 +00:00
parent 7ab8c76aa0
commit aa5ae028b2

View File

@@ -1,18 +1,18 @@
import defineAction from '../../../../helpers/define-action';
export default defineAction({
name: 'Remove Image Background',
name: 'Remove image background',
key: 'removeImageBackground',
description:
'Removes the background of an image.',
arguments: [
{
label: 'Image file',
key: 'imageFile',
key: 'imageFileB64',
type: 'string' as const,
required: true,
variables: true,
description: 'Provide a JPG or PNG file, up to 12 MB (see remove.bg/supported-images)',
description: 'Provide a JPG or PNG file in Base64 format, up to 12 MB (see remove.bg/supported-images)',
},
{
label: 'Size',
@@ -27,16 +27,17 @@ export default defineAction({
]
},
{
label: 'Add background color',
label: 'Background color',
key: 'bgColor',
type: 'string' as const,
description: 'Can be a hex color code (e.g. 81d4fa, fff) or a color name (e.g. green)',
description: 'Adds a solid color background. Can be a hex color code (e.g. 81d4fa, fff) or a color name (e.g. green)',
required: false,
},
{
label: 'Add background image URL',
key: 'bgImage',
label: 'Background image URL',
key: 'bgImageUrl',
type: 'string' as const,
description: 'Adds a background image from a URL.',
required: false,
},
{
@@ -50,22 +51,22 @@ export default defineAction({
{ label: 'Auto', value: 'auto' },
{ label: 'PNG', value: 'png' },
{ label: 'JPG', value: 'jpg' },
{ label: 'ZIP', value: 'zip'}
{ label: 'ZIP', value: 'zip' }
]
}
],
async run($) {
const imageFile = $.step.parameters.imageFile as string;
const imageFileB64 = $.step.parameters.imageFileB64 as string;
const size = $.step.parameters.size as string;
const bgColor = $.step.parameters.bgColor as string;
const bgImage = $.step.parameters.bgImage as string;
const bgImageUrl = $.step.parameters.bgImageUrl as string;
const outputFormat = $.step.parameters.outputFormat as string;
const body = JSON.stringify({
image_file_b64: imageFile,
image_file_b64: imageFileB64,
size: size,
bg_Color: bgColor,
bg_image_url: bgImage,
bg_color: bgColor,
bg_image_url: bgImageUrl,
format: outputFormat
});
@@ -78,4 +79,4 @@ export default defineAction({
$.setActionItem({ raw: response.data });
}
})
});