Add Activepieces integration for workflow automation
- Add Activepieces fork with SmoothSchedule custom piece - Create integrations app with Activepieces service layer - Add embed token endpoint for iframe integration - Create Automations page with embedded workflow builder - Add sidebar visibility fix for embed mode - Add list inactive customers endpoint to Public API - Include SmoothSchedule triggers: event created/updated/cancelled - Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": ["../../../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# pieces-image-helper
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-image-helper` to build the library.
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "@activepieces/piece-image-helper",
|
||||
"version": "0.1.8",
|
||||
"dependencies": {
|
||||
"jimp": "^0.22.12",
|
||||
"exifreader": "4.20.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "pieces-image-helper",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/image-helper/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/packages/pieces/community/image-helper",
|
||||
"tsConfig": "packages/pieces/community/image-helper/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/image-helper/package.json",
|
||||
"main": "packages/pieces/community/image-helper/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/image-helper/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/image-helper/src/i18n",
|
||||
"output": "./src/i18n",
|
||||
"glob": "**/!(i18n.json)"
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"updateBuildableProjectDepsInPackageJson": true
|
||||
},
|
||||
"dependsOn": [
|
||||
"prebuild",
|
||||
"^build"
|
||||
]
|
||||
},
|
||||
"publish": {
|
||||
"command": "node tools/scripts/publish.mjs pieces-image-helper {args.ver} {args.tag}",
|
||||
"dependsOn": [
|
||||
"build"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
},
|
||||
"prebuild": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/pieces/community/image-helper",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Image Helper": "Image Helper",
|
||||
"Tools for image manipulations": "Tools for image manipulations",
|
||||
"Image to Base64": "Image to Base64",
|
||||
"Get image metadata": "Get image metadata",
|
||||
"Crop an image": "Crop an image",
|
||||
"Rotate an image": "Rotate an image",
|
||||
"Resize an image": "Resize an image",
|
||||
"Compresses an image": "Compresses an image",
|
||||
"Converts an image to an url-like Base64 string": "Converts an image to an url-like Base64 string",
|
||||
"Gets metadata from an image": "Gets metadata from an image",
|
||||
"Crops an image": "Crops an image",
|
||||
"Rotates an image": "Rotates an image",
|
||||
"Resizes an image": "Resizes an image",
|
||||
"Image": "Image",
|
||||
"Override mime type": "Override mime type",
|
||||
"Left": "Left",
|
||||
"Top": "Top",
|
||||
"Width": "Width",
|
||||
"Height": "Height",
|
||||
"Result File Name": "Result File Name",
|
||||
"Degree": "Degree",
|
||||
"Maintain aspect ratio for height": "Maintain aspect ratio for height",
|
||||
"Quality": "Quality",
|
||||
"Format": "Format",
|
||||
"The image to convert": "The image to convert",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "The mime type to use when converting the image. In case you want to override the default mime type. Example image/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Specifies the horizontal position, indicating where the cropping starts from the left side of the image.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Represents the vertical position, indicating the starting point from the top of the image.",
|
||||
"Determines the horizontal size of the cropped area.": "Determines the horizontal size of the cropped area.",
|
||||
"Determines the vertical size of the cropped area.": "Determines the vertical size of the cropped area.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Specifies the output file name for the cropped image (without extension).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Specifies the degree of clockwise rotation applied to the image.",
|
||||
"Specifies the output file name for the result image (without extension).": "Specifies the output file name for the result image (without extension).",
|
||||
"Specifies the width of the image.": "Specifies the width of the image.",
|
||||
"Specifies the height of the image.": "Specifies the height of the image.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Specifies the quality of the image after compression (0-100).",
|
||||
"Specifies the format of the image after compression.": "Specifies the format of the image after compression.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "High Quality",
|
||||
"Lossy Quality": "Lossy Quality",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"Tools for image manipulations": "Werkzeuge für Bildmanipulationen",
|
||||
"Image to Base64": "Bild zu Base64",
|
||||
"Get image metadata": "Bild-Metadaten abrufen",
|
||||
"Crop an image": "Bild zuschneiden",
|
||||
"Rotate an image": "Bild drehen",
|
||||
"Resize an image": "Bildgröße ändern",
|
||||
"Compresses an image": "Komprimiert ein Bild",
|
||||
"Converts an image to an url-like Base64 string": "Konvertiert ein Bild in eine url-artige Base64-Zeichenkette",
|
||||
"Gets metadata from an image": "Ruft Metadaten von einem Bild ab",
|
||||
"Crops an image": "Bild zuschneiden",
|
||||
"Rotates an image": "Dreht ein Bild",
|
||||
"Resizes an image": "Größe eines Bildes",
|
||||
"Image": "Bild",
|
||||
"Override mime type": "Mime-Typ überschreiben",
|
||||
"Left": "Links",
|
||||
"Top": "Oben",
|
||||
"Width": "Width",
|
||||
"Height": "Höhe",
|
||||
"Result File Name": "Ergebnisdateiname",
|
||||
"Degree": "Grad",
|
||||
"Maintain aspect ratio for height": "Seitenverhältnis für Höhe beibehalten",
|
||||
"Quality": "Qualität",
|
||||
"Format": "Format",
|
||||
"The image to convert": "Das zu konvertierende Bild",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "Der Mime-Typ, der bei der Konvertierung des Bildes verwendet wird. Falls Sie den Standard-Mime-Typ überschreiben möchten. Beispielbild/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Bestimmt die horizontale Position und zeigt an, wo das Zuschneiden von der linken Seite des Bildes beginnt.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Stellt die vertikale Position dar und zeigt den Startpunkt von oben an.",
|
||||
"Determines the horizontal size of the cropped area.": "Bestimmt die horizontale Größe des zugeschnittenen Bereichs.",
|
||||
"Determines the vertical size of the cropped area.": "Bestimmt die vertikale Größe des zugeschnittenen Bereichs.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Gibt den Dateinamen für das zugeschnittene Bild an (ohne Erweiterung).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Legt den Grad der Uhrzeigersinn des Bildes fest.",
|
||||
"Specifies the output file name for the result image (without extension).": "Gibt den Dateinamen für das Ergebnisbild an (ohne Erweiterung).",
|
||||
"Specifies the width of the image.": "Gibt die Breite des Bildes an.",
|
||||
"Specifies the height of the image.": "Gibt die Höhe des Bildes an.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Bestimmt die Qualität des Bildes nach der Komprimierung (0-100).",
|
||||
"Specifies the format of the image after compression.": "Bestimmt das Format des Bildes nach der Komprimierung.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "Hohe Qualität",
|
||||
"Lossy Quality": "Verlustqualität",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"Tools for image manipulations": "Herramientas para manipulaciones de imágenes",
|
||||
"Image to Base64": "Imagen a Base64",
|
||||
"Get image metadata": "Obtener metadatos de imagen",
|
||||
"Crop an image": "Recortar una imagen",
|
||||
"Rotate an image": "Rotar una imagen",
|
||||
"Resize an image": "Redimensionar una imagen",
|
||||
"Compresses an image": "Comprime una imagen",
|
||||
"Converts an image to an url-like Base64 string": "Convierte una imagen a una cadena Base64 similar a la url",
|
||||
"Gets metadata from an image": "Obtiene metadatos de una imagen",
|
||||
"Crops an image": "Recortar una imagen",
|
||||
"Rotates an image": "Rota una imagen",
|
||||
"Resizes an image": "Redimensionar una imagen",
|
||||
"Image": "Imagen",
|
||||
"Override mime type": "Anular tipo mime",
|
||||
"Left": "Queda",
|
||||
"Top": "Subir",
|
||||
"Width": "Width",
|
||||
"Height": "Altura",
|
||||
"Result File Name": "Nombre de archivo resultante",
|
||||
"Degree": "Grado",
|
||||
"Maintain aspect ratio for height": "Mantener la relación de aspecto para la altura",
|
||||
"Quality": "Calidad",
|
||||
"Format": "Formatear",
|
||||
"The image to convert": "La imagen a convertir",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "El tipo mime a usar al convertir la imagen. En caso de que desee reemplazar el tipo mime predeterminado. Ejemplo image/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Especifica la posición horizontal, indicando dónde empieza el recorte desde el lado izquierdo de la imagen.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Representa la posición vertical, indicando el punto de partida desde la parte superior de la imagen.",
|
||||
"Determines the horizontal size of the cropped area.": "Determina el tamaño horizontal del área recortada.",
|
||||
"Determines the vertical size of the cropped area.": "Determina el tamaño vertical del área recortada.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Especifica el nombre del archivo de salida para la imagen recortada (sin extensión).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Especifica el grado de rotación en el sentido de las agujas del reloj aplicada a la imagen.",
|
||||
"Specifies the output file name for the result image (without extension).": "Especifica el nombre del archivo de salida para la imagen resultante (sin extensión).",
|
||||
"Specifies the width of the image.": "Especifica el ancho de la imagen.",
|
||||
"Specifies the height of the image.": "Especifica la altura de la imagen.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Especifica la calidad de la imagen después de la compresión (0-100).",
|
||||
"Specifies the format of the image after compression.": "Especifica el formato de la imagen después de la compresión.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "Alta calidad",
|
||||
"Lossy Quality": "Calidad de pérdida",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"Tools for image manipulations": "Outils pour les manipulations d'images",
|
||||
"Image to Base64": "Image vers Base64",
|
||||
"Get image metadata": "Récupérer les métadonnées de l'image",
|
||||
"Crop an image": "Recadrer une image",
|
||||
"Rotate an image": "Faire pivoter une image",
|
||||
"Resize an image": "Redimensionner une image",
|
||||
"Compresses an image": "Compresse une image",
|
||||
"Converts an image to an url-like Base64 string": "Convertit une image en une chaîne de caractères Base64 de type url",
|
||||
"Gets metadata from an image": "Obtient les métadonnées à partir d'une image",
|
||||
"Crops an image": "Recadre une image",
|
||||
"Rotates an image": "Rotation d'une image",
|
||||
"Resizes an image": "Redimensionne une image",
|
||||
"Image": "Image",
|
||||
"Override mime type": "Remplacer le type MIME",
|
||||
"Left": "Gauche",
|
||||
"Top": "En haut",
|
||||
"Width": "Width",
|
||||
"Height": "Hauteur",
|
||||
"Result File Name": "Nom du fichier de résultat",
|
||||
"Degree": "Diplôme",
|
||||
"Maintain aspect ratio for height": "Maintenir le ratio d'aspect pour la hauteur",
|
||||
"Quality": "Qualité",
|
||||
"Format": "Formater",
|
||||
"The image to convert": "L'image à convertir",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "Le type mime à utiliser lors de la conversion de l'image. Dans le cas où vous voulez remplacer le type mime par défaut. Exemple d'image/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Spécifie la position horizontale, indiquant où le recadrage commence à partir du côté gauche de l'image.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Représente la position verticale indiquant le point de départ en haut de l'image.",
|
||||
"Determines the horizontal size of the cropped area.": "Détermine la taille horizontale de la zone recadrée.",
|
||||
"Determines the vertical size of the cropped area.": "Détermine la taille verticale de la zone recadrée.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Spécifie le nom du fichier de sortie pour l'image recadrée (sans extension).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Spécifie le degré de rotation dans le sens horaire appliqué à l'image.",
|
||||
"Specifies the output file name for the result image (without extension).": "Spécifie le nom du fichier de sortie pour l'image de résultat (sans extension).",
|
||||
"Specifies the width of the image.": "Spécifie la largeur de l'image.",
|
||||
"Specifies the height of the image.": "Spécifie la hauteur de l'image.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Spécifie la qualité de l'image après compression (0-100).",
|
||||
"Specifies the format of the image after compression.": "Spécifie le format de l'image après la compression.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "Haute qualité",
|
||||
"Lossy Quality": "Qualité perdue",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Image Helper": "Image Helper",
|
||||
"Tools for image manipulations": "Tools for image manipulations",
|
||||
"Image to Base64": "Image to Base64",
|
||||
"Get image metadata": "Get image metadata",
|
||||
"Crop an image": "Crop an image",
|
||||
"Rotate an image": "Rotate an image",
|
||||
"Resize an image": "Resize an image",
|
||||
"Compresses an image": "Compresses an image",
|
||||
"Converts an image to an url-like Base64 string": "Converts an image to an url-like Base64 string",
|
||||
"Gets metadata from an image": "Gets metadata from an image",
|
||||
"Crops an image": "Crops an image",
|
||||
"Rotates an image": "Rotates an image",
|
||||
"Resizes an image": "Resizes an image",
|
||||
"Image": "Image",
|
||||
"Override mime type": "Override mime type",
|
||||
"Left": "Left",
|
||||
"Top": "Top",
|
||||
"Width": "Width",
|
||||
"Height": "Height",
|
||||
"Result File Name": "Result File Name",
|
||||
"Degree": "Degree",
|
||||
"Maintain aspect ratio for height": "Maintain aspect ratio for height",
|
||||
"Quality": "Quality",
|
||||
"Format": "Format",
|
||||
"The image to convert": "The image to convert",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "The mime type to use when converting the image. In case you want to override the default mime type. Example image/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Specifies the horizontal position, indicating where the cropping starts from the left side of the image.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Represents the vertical position, indicating the starting point from the top of the image.",
|
||||
"Determines the horizontal size of the cropped area.": "Determines the horizontal size of the cropped area.",
|
||||
"Determines the vertical size of the cropped area.": "Determines the vertical size of the cropped area.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Specifies the output file name for the cropped image (without extension).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Specifies the degree of clockwise rotation applied to the image.",
|
||||
"Specifies the output file name for the result image (without extension).": "Specifies the output file name for the result image (without extension).",
|
||||
"Specifies the width of the image.": "Specifies the width of the image.",
|
||||
"Specifies the height of the image.": "Specifies the height of the image.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Specifies the quality of the image after compression (0-100).",
|
||||
"Specifies the format of the image after compression.": "Specifies the format of the image after compression.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "High Quality",
|
||||
"Lossy Quality": "Lossy Quality",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Image Helper": "Image Helper",
|
||||
"Tools for image manipulations": "Tools for image manipulations",
|
||||
"Image to Base64": "Image to Base64",
|
||||
"Get image metadata": "Get image metadata",
|
||||
"Crop an image": "Crop an image",
|
||||
"Rotate an image": "Rotate an image",
|
||||
"Resize an image": "Resize an image",
|
||||
"Compresses an image": "Compresses an image",
|
||||
"Converts an image to an url-like Base64 string": "Converts an image to an url-like Base64 string",
|
||||
"Gets metadata from an image": "Gets metadata from an image",
|
||||
"Crops an image": "Crops an image",
|
||||
"Rotates an image": "Rotates an image",
|
||||
"Resizes an image": "Resizes an image",
|
||||
"Image": "Image",
|
||||
"Override mime type": "Override mime type",
|
||||
"Left": "Left",
|
||||
"Top": "Top",
|
||||
"Width": "Width",
|
||||
"Height": "Height",
|
||||
"Result File Name": "Result File Name",
|
||||
"Degree": "Degree",
|
||||
"Maintain aspect ratio for height": "Maintain aspect ratio for height",
|
||||
"Quality": "Quality",
|
||||
"Format": "Format",
|
||||
"The image to convert": "The image to convert",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "The mime type to use when converting the image. In case you want to override the default mime type. Example image/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Specifies the horizontal position, indicating where the cropping starts from the left side of the image.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Represents the vertical position, indicating the starting point from the top of the image.",
|
||||
"Determines the horizontal size of the cropped area.": "Determines the horizontal size of the cropped area.",
|
||||
"Determines the vertical size of the cropped area.": "Determines the vertical size of the cropped area.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Specifies the output file name for the cropped image (without extension).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Specifies the degree of clockwise rotation applied to the image.",
|
||||
"Specifies the output file name for the result image (without extension).": "Specifies the output file name for the result image (without extension).",
|
||||
"Specifies the width of the image.": "Specifies the width of the image.",
|
||||
"Specifies the height of the image.": "Specifies the height of the image.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Specifies the quality of the image after compression (0-100).",
|
||||
"Specifies the format of the image after compression.": "Specifies the format of the image after compression.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "High Quality",
|
||||
"Lossy Quality": "Lossy Quality",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"Tools for image manipulations": "画像操作のためのツール",
|
||||
"Image to Base64": "Base64への画像",
|
||||
"Get image metadata": "画像メタデータを取得する",
|
||||
"Crop an image": "画像をトリミングする",
|
||||
"Rotate an image": "画像を回転",
|
||||
"Resize an image": "画像のサイズを変更",
|
||||
"Compresses an image": "画像を圧縮",
|
||||
"Converts an image to an url-like Base64 string": "画像を URL のような Base64 文字列に変換します。",
|
||||
"Gets metadata from an image": "画像からメタデータを取得します",
|
||||
"Crops an image": "画像を切り取り",
|
||||
"Rotates an image": "画像を回転",
|
||||
"Resizes an image": "画像のサイズを変更",
|
||||
"Image": "画像",
|
||||
"Override mime type": "MIMEタイプを上書きする",
|
||||
"Left": "左",
|
||||
"Top": "上",
|
||||
"Width": "Width",
|
||||
"Height": "高さ",
|
||||
"Result File Name": "結果のファイル名",
|
||||
"Degree": "度",
|
||||
"Maintain aspect ratio for height": "高さの縦横比を維持します",
|
||||
"Quality": "品質",
|
||||
"Format": "書式",
|
||||
"The image to convert": "変換する画像",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "画像変換時に使用する Mime タイプ。デフォルトの Mime タイプを上書きしたい場合。例: image/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "画像の左側からトリミングが始まる位置を示す水平方向の位置を指定します。",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "画像の上からの開始点を示す垂直位置を表します。",
|
||||
"Determines the horizontal size of the cropped area.": "トリミングされた範囲の水平方向のサイズを指定します。",
|
||||
"Determines the vertical size of the cropped area.": "トリミングされた領域の垂直方向のサイズを指定します。",
|
||||
"Specifies the output file name for the cropped image (without extension).": "トリミングされたイメージの出力ファイル名を指定します (拡張子なし)。",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "画像に適用される時計回りの回転の度合いを指定します。",
|
||||
"Specifies the output file name for the result image (without extension).": "結果イメージの出力ファイル名を指定します (拡張子なし)。",
|
||||
"Specifies the width of the image.": "画像の幅を指定します。",
|
||||
"Specifies the height of the image.": "画像の高さを指定します。",
|
||||
"Specifies the quality of the image after compression (0-100).": "圧縮後の画像の画質を指定します (0-100)。",
|
||||
"Specifies the format of the image after compression.": "圧縮後の画像の形式を指定します。",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "高品質",
|
||||
"Lossy Quality": "ロッシー品質",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"Tools for image manipulations": "Tools voor beeldmanipulatie",
|
||||
"Image to Base64": "Afbeelding naar Base64",
|
||||
"Get image metadata": "Metadata van afbeeldingen ophalen",
|
||||
"Crop an image": "Een afbeelding bijsnijden",
|
||||
"Rotate an image": "Draai een afbeelding",
|
||||
"Resize an image": "Een afbeelding aanpassen",
|
||||
"Compresses an image": "Comprimeert een afbeelding",
|
||||
"Converts an image to an url-like Base64 string": "Converteert een afbeelding naar een url-achtige Base64 string",
|
||||
"Gets metadata from an image": "Haalt metadata op van een afbeelding",
|
||||
"Crops an image": "Plaatst een afbeelding",
|
||||
"Rotates an image": "Draait een afbeelding",
|
||||
"Resizes an image": "Herschik een afbeelding",
|
||||
"Image": "Afbeelding",
|
||||
"Override mime type": "Mime type overschrijven",
|
||||
"Left": "Linkerkant",
|
||||
"Top": "Bovenkant",
|
||||
"Width": "Width",
|
||||
"Height": "Højde",
|
||||
"Result File Name": "Resultaat bestandsnaam",
|
||||
"Degree": "Graad",
|
||||
"Maintain aspect ratio for height": "Verhouding van beeldverhouding behouden voor hoogte",
|
||||
"Quality": "Kwaliteit",
|
||||
"Format": "Formatteren",
|
||||
"The image to convert": "De afbeelding om te converteren",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "Het MIME-type dat gebruikt moet worden bij het converteren van de afbeelding. In het geval dat je het standaard MIME-type wilt overschrijven. Voorbeeld afbeelding/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Specificeert de horizontale positie, wat aangeeft waar het bijsnijden begint vanaf de linkerkant van de afbeelding.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Vertegenwoordigt de verticale positie en geeft het startpunt aan de bovenkant van de afbeelding.",
|
||||
"Determines the horizontal size of the cropped area.": "Bepaalt de horizontale grootte van het bijgesneden gebied.",
|
||||
"Determines the vertical size of the cropped area.": "Bepaalt de verticale grootte van het bijgesneden gebied.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Geeft de uitvoerbestandsnaam voor de bijgesneden afbeelding aan (zonder extensie).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Hiermee geeft u de mate van de klok om rotatie toe te passen op de afbeelding.",
|
||||
"Specifies the output file name for the result image (without extension).": "Hiermee geeft u de uitvoer bestandsnaam voor de afbeelding (zonder extensie).",
|
||||
"Specifies the width of the image.": "Specificeert de breedte van de afbeelding.",
|
||||
"Specifies the height of the image.": "Specificeert de hoogte van de afbeelding.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Specificeert de kwaliteit van de afbeelding na compressie (0-100).",
|
||||
"Specifies the format of the image after compression.": "Specificeert het formaat van de afbeelding na compressie.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "Hoge kwaliteit",
|
||||
"Lossy Quality": "Verlikte kwaliteit",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"Tools for image manipulations": "Ferramentas para manipulações de imagem",
|
||||
"Image to Base64": "Imagem para Base64",
|
||||
"Get image metadata": "Obter metadados da imagem",
|
||||
"Crop an image": "Recortar uma imagem",
|
||||
"Rotate an image": "Girar uma imagem",
|
||||
"Resize an image": "Redimensionar uma imagem",
|
||||
"Compresses an image": "Compacta uma imagem",
|
||||
"Converts an image to an url-like Base64 string": "Converte uma imagem para uma string tipo Base64 de url",
|
||||
"Gets metadata from an image": "Obtém metadados a partir de uma imagem",
|
||||
"Crops an image": "Corta uma imagem",
|
||||
"Rotates an image": "Gira uma imagem",
|
||||
"Resizes an image": "Redimensiona uma imagem",
|
||||
"Image": "Imagem:",
|
||||
"Override mime type": "Substituir tipo Mime",
|
||||
"Left": "Esquerda",
|
||||
"Top": "Superior",
|
||||
"Width": "Width",
|
||||
"Height": "Altura",
|
||||
"Result File Name": "Nome do Arquivo Resultado",
|
||||
"Degree": "Graus",
|
||||
"Maintain aspect ratio for height": "Manter proporção de aspecto para altura",
|
||||
"Quality": "Qualidade",
|
||||
"Format": "Formato",
|
||||
"The image to convert": "A imagem a ser convertida",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "O tipo de MIME a ser usado ao converter a imagem. Caso queira substituir o tipo padrão de mime imagem/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Especifica a posição horizontal, indicando onde o corte começa a partir do lado esquerdo da imagem.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Representa a posição vertical, indicando o ponto de partida do topo da imagem.",
|
||||
"Determines the horizontal size of the cropped area.": "Determina o tamanho horizontal da área cortada.",
|
||||
"Determines the vertical size of the cropped area.": "Determina o tamanho vertical da área cortada.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Especifica o nome do arquivo de saída para a imagem cortada (sem extensão).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Especifica o grau de rotação aplicada à imagem no sentido horário.",
|
||||
"Specifies the output file name for the result image (without extension).": "Especifica o nome do arquivo de saída para a imagem de resultado (sem extensão).",
|
||||
"Specifies the width of the image.": "Especifica a largura da imagem.",
|
||||
"Specifies the height of the image.": "Especifica a altura da imagem.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Especifica a qualidade da imagem após a compressão (0-100).",
|
||||
"Specifies the format of the image after compression.": "Especifica o formato da imagem após a compressão.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "Alta Qualidade",
|
||||
"Lossy Quality": "Qualidade das perdas",
|
||||
"JPG": "Jpg",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Image Helper": "Артикул",
|
||||
"Tools for image manipulations": "Инструменты для управления изображениями",
|
||||
"Image to Base64": "Изображение в Base64",
|
||||
"Get image metadata": "Получить метаданные изображения",
|
||||
"Crop an image": "Обрезать изображение",
|
||||
"Rotate an image": "Повернуть изображение",
|
||||
"Resize an image": "Изменить размер изображения",
|
||||
"Compresses an image": "Сжатие изображения",
|
||||
"Converts an image to an url-like Base64 string": "Преобразует изображение в url-подобную строку Base64",
|
||||
"Gets metadata from an image": "Получает метаданные из изображения",
|
||||
"Crops an image": "Обрезать изображение",
|
||||
"Rotates an image": "Поворот изображения",
|
||||
"Resizes an image": "Изменение размера изображения",
|
||||
"Image": "Изображение",
|
||||
"Override mime type": "Переопределить тип mime",
|
||||
"Left": "Слева",
|
||||
"Top": "Сверху",
|
||||
"Width": "Width",
|
||||
"Height": "Высота",
|
||||
"Result File Name": "Имя файла результата",
|
||||
"Degree": "Степень",
|
||||
"Maintain aspect ratio for height": "Сохранять соотношение сторон для высоты",
|
||||
"Quality": "Качество",
|
||||
"Format": "Формат",
|
||||
"The image to convert": "Изображение для преобразования",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "Тип mime для использования при преобразовании изображения. Если вы хотите переопределить mime-тип по умолчанию. Пример image/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Определяет горизонтальное положение, указывающее, где начинается обрезка с левой стороны изображения.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Представляет собой вертикальное положение, указывающее исходную точку сверху изображения.",
|
||||
"Determines the horizontal size of the cropped area.": "Определяет горизонтальный размер обрезанной области.",
|
||||
"Determines the vertical size of the cropped area.": "Определяет размер вертикальной обрезанной области.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Указывается имя выходного файла для обрезанного изображения (без расширения).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Определяет степень вращения по часовой стрелке, применяемого к изображению.",
|
||||
"Specifies the output file name for the result image (without extension).": "Указывает имя выходного файла результирующего изображения (без расширения).",
|
||||
"Specifies the width of the image.": "Определяет ширину изображения.",
|
||||
"Specifies the height of the image.": "Определяет высоту изображения.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Качество изображения после сжатия (0-100).",
|
||||
"Specifies the format of the image after compression.": "Формат изображения после сжатия.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "Высокое качество",
|
||||
"Lossy Quality": "Качество потерь",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"Tools for image manipulations": "Tools for image manipulations",
|
||||
"Image to Base64": "Image to Base64",
|
||||
"Get image metadata": "Get image metadata",
|
||||
"Crop an image": "Crop an image",
|
||||
"Rotate an image": "Rotate an image",
|
||||
"Resize an image": "Resize an image",
|
||||
"Compresses an image": "Compresses an image",
|
||||
"Converts an image to an url-like Base64 string": "Converts an image to an url-like Base64 string",
|
||||
"Gets metadata from an image": "Gets metadata from an image",
|
||||
"Crops an image": "Crops an image",
|
||||
"Rotates an image": "Rotates an image",
|
||||
"Resizes an image": "Resizes an image",
|
||||
"Image": "Image",
|
||||
"Override mime type": "Override mime type",
|
||||
"Left": "Left",
|
||||
"Top": "Top",
|
||||
"Width": "Width",
|
||||
"Height": "Height",
|
||||
"Result File Name": "Result File Name",
|
||||
"Degree": "Degree",
|
||||
"Maintain aspect ratio for height": "Maintain aspect ratio for height",
|
||||
"Quality": "Quality",
|
||||
"Format": "Format",
|
||||
"The image to convert": "The image to convert",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "The mime type to use when converting the image. In case you want to override the default mime type. Example image/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Specifies the horizontal position, indicating where the cropping starts from the left side of the image.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Represents the vertical position, indicating the starting point from the top of the image.",
|
||||
"Determines the horizontal size of the cropped area.": "Determines the horizontal size of the cropped area.",
|
||||
"Determines the vertical size of the cropped area.": "Determines the vertical size of the cropped area.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Specifies the output file name for the cropped image (without extension).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Specifies the degree of clockwise rotation applied to the image.",
|
||||
"Specifies the output file name for the result image (without extension).": "Specifies the output file name for the result image (without extension).",
|
||||
"Specifies the width of the image.": "Specifies the width of the image.",
|
||||
"Specifies the height of the image.": "Specifies the height of the image.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Specifies the quality of the image after compression (0-100).",
|
||||
"Specifies the format of the image after compression.": "Specifies the format of the image after compression.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "High Quality",
|
||||
"Lossy Quality": "Lossy Quality",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Image Helper": "Image Helper",
|
||||
"Tools for image manipulations": "Tools for image manipulations",
|
||||
"Image to Base64": "Image to Base64",
|
||||
"Get image metadata": "Get image metadata",
|
||||
"Crop an image": "Crop an image",
|
||||
"Rotate an image": "Rotate an image",
|
||||
"Resize an image": "Resize an image",
|
||||
"Compresses an image": "Compresses an image",
|
||||
"Converts an image to an url-like Base64 string": "Converts an image to an url-like Base64 string",
|
||||
"Gets metadata from an image": "Gets metadata from an image",
|
||||
"Crops an image": "Crops an image",
|
||||
"Rotates an image": "Rotates an image",
|
||||
"Resizes an image": "Resizes an image",
|
||||
"Image": "Image",
|
||||
"Override mime type": "Override mime type",
|
||||
"Left": "Left",
|
||||
"Top": "Top",
|
||||
"Width": "Width",
|
||||
"Height": "Height",
|
||||
"Result File Name": "Result File Name",
|
||||
"Degree": "Degree",
|
||||
"Maintain aspect ratio for height": "Maintain aspect ratio for height",
|
||||
"Quality": "Quality",
|
||||
"Format": "Format",
|
||||
"The image to convert": "The image to convert",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "The mime type to use when converting the image. In case you want to override the default mime type. Example image/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Specifies the horizontal position, indicating where the cropping starts from the left side of the image.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Represents the vertical position, indicating the starting point from the top of the image.",
|
||||
"Determines the horizontal size of the cropped area.": "Determines the horizontal size of the cropped area.",
|
||||
"Determines the vertical size of the cropped area.": "Determines the vertical size of the cropped area.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Specifies the output file name for the cropped image (without extension).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Specifies the degree of clockwise rotation applied to the image.",
|
||||
"Specifies the output file name for the result image (without extension).": "Specifies the output file name for the result image (without extension).",
|
||||
"Specifies the width of the image.": "Specifies the width of the image.",
|
||||
"Specifies the height of the image.": "Specifies the height of the image.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Specifies the quality of the image after compression (0-100).",
|
||||
"Specifies the format of the image after compression.": "Specifies the format of the image after compression.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "High Quality",
|
||||
"Lossy Quality": "Lossy Quality",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"Tools for image manipulations": "Tools for image manipulations",
|
||||
"Image to Base64": "Image to Base64",
|
||||
"Get image metadata": "Get image metadata",
|
||||
"Crop an image": "Crop an image",
|
||||
"Rotate an image": "Rotate an image",
|
||||
"Resize an image": "Resize an image",
|
||||
"Compresses an image": "Compresses an image",
|
||||
"Converts an image to an url-like Base64 string": "Converts an image to an url-like Base64 string",
|
||||
"Gets metadata from an image": "Gets metadata from an image",
|
||||
"Crops an image": "Crops an image",
|
||||
"Rotates an image": "Rotates an image",
|
||||
"Resizes an image": "Resizes an image",
|
||||
"Image": "Image",
|
||||
"Override mime type": "Override mime type",
|
||||
"Left": "Left",
|
||||
"Top": "Top",
|
||||
"Width": "Width",
|
||||
"Height": "Height",
|
||||
"Result File Name": "Result File Name",
|
||||
"Degree": "Degree",
|
||||
"Maintain aspect ratio for height": "Maintain aspect ratio for height",
|
||||
"Quality": "Quality",
|
||||
"Format": "Format",
|
||||
"The image to convert": "The image to convert",
|
||||
"The mime type to use when converting the image. In case you want to override the default mime type. Example image/png": "The mime type to use when converting the image. In case you want to override the default mime type. Example image/png",
|
||||
"Specifies the horizontal position, indicating where the cropping starts from the left side of the image.": "Specifies the horizontal position, indicating where the cropping starts from the left side of the image.",
|
||||
"Represents the vertical position, indicating the starting point from the top of the image.": "Represents the vertical position, indicating the starting point from the top of the image.",
|
||||
"Determines the horizontal size of the cropped area.": "Determines the horizontal size of the cropped area.",
|
||||
"Determines the vertical size of the cropped area.": "Determines the vertical size of the cropped area.",
|
||||
"Specifies the output file name for the cropped image (without extension).": "Specifies the output file name for the cropped image (without extension).",
|
||||
"Specifies the degree of clockwise rotation applied to the image.": "Specifies the degree of clockwise rotation applied to the image.",
|
||||
"Specifies the output file name for the result image (without extension).": "Specifies the output file name for the result image (without extension).",
|
||||
"Specifies the width of the image.": "Specifies the width of the image.",
|
||||
"Specifies the height of the image.": "Specifies the height of the image.",
|
||||
"Specifies the quality of the image after compression (0-100).": "Specifies the quality of the image after compression (0-100).",
|
||||
"Specifies the format of the image after compression.": "Specifies the format of the image after compression.",
|
||||
"90°": "90°",
|
||||
"180°": "180°",
|
||||
"270°": "270°",
|
||||
"High Quality": "High Quality",
|
||||
"Lossy Quality": "Lossy Quality",
|
||||
"JPG": "JPG",
|
||||
"PNG": "PNG"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
import { imageToBase64 } from './lib/actions/image-to-base64.action';
|
||||
import { getMetaData } from './lib/actions/get-metadata.action';
|
||||
import { cropImage } from './lib/actions/crop-image.action';
|
||||
import { rotateImage } from './lib/actions/rotate-image.action';
|
||||
import { resizeImage } from './lib/actions/resize-Image.action';
|
||||
import { compressImage } from './lib/actions/compress-image.actions';
|
||||
|
||||
export const imageHelper = createPiece({
|
||||
displayName: 'Image Helper',
|
||||
description: 'Tools for image manipulations',
|
||||
|
||||
auth: PieceAuth.None(),
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/image-helper.png',
|
||||
authors: ["AbdullahBitar","kishanprmr","abuaboud"],
|
||||
categories: [PieceCategory.CORE],
|
||||
actions: [imageToBase64, getMetaData, cropImage, rotateImage, resizeImage, compressImage],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,60 @@
|
||||
import { Property, createAction } from '@activepieces/pieces-framework';
|
||||
import jimp from 'jimp';
|
||||
|
||||
export const compressImage = createAction({
|
||||
name: 'compress_image',
|
||||
description: 'Compresses an image',
|
||||
displayName: 'Compresses an image',
|
||||
props: {
|
||||
image: Property.File({
|
||||
displayName: 'Image',
|
||||
required: true,
|
||||
}),
|
||||
quality: Property.StaticDropdown({
|
||||
displayName: 'Quality',
|
||||
description:
|
||||
'Specifies the quality of the image after compression (0-100).',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'High Quality', value: 90 },
|
||||
{ label: 'Lossy Quality', value: 60 },
|
||||
],
|
||||
},
|
||||
}),
|
||||
format: Property.StaticDropdown({
|
||||
displayName: 'Format',
|
||||
description: 'Specifies the format of the image after compression.',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'JPG', value: 'jpg' },
|
||||
{ label: 'PNG', value: 'png' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
resultFileName: Property.ShortText({
|
||||
displayName: 'Result File Name',
|
||||
description:
|
||||
'Specifies the output file name for the result image (without extension).',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const image = await jimp.read(context.propsValue.image.data);
|
||||
|
||||
image.quality(context.propsValue.quality);
|
||||
|
||||
const imageBuffer = await image.getBufferAsync(image.getMIME());
|
||||
|
||||
const imageReference = await context.files.write({
|
||||
fileName:
|
||||
(context.propsValue.resultFileName ?? 'image') +
|
||||
'.' +
|
||||
context.propsValue.format,
|
||||
data: imageBuffer,
|
||||
});
|
||||
|
||||
return imageReference;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,65 @@
|
||||
import { Property, createAction } from '@activepieces/pieces-framework';
|
||||
import jimp from 'jimp';
|
||||
|
||||
export const cropImage = createAction({
|
||||
name: 'crop_image',
|
||||
description: 'Crops an image',
|
||||
displayName: 'Crop an image',
|
||||
props: {
|
||||
image: Property.File({
|
||||
displayName: 'Image',
|
||||
required: true,
|
||||
}),
|
||||
left: Property.Number({
|
||||
displayName: 'Left',
|
||||
description:
|
||||
'Specifies the horizontal position, indicating where the cropping starts from the left side of the image.',
|
||||
required: true,
|
||||
}),
|
||||
top: Property.Number({
|
||||
displayName: 'Top',
|
||||
description:
|
||||
'Represents the vertical position, indicating the starting point from the top of the image.',
|
||||
required: true,
|
||||
}),
|
||||
width: Property.Number({
|
||||
displayName: 'Width',
|
||||
description: 'Determines the horizontal size of the cropped area.',
|
||||
required: true,
|
||||
}),
|
||||
height: Property.Number({
|
||||
displayName: 'Height',
|
||||
description: 'Determines the vertical size of the cropped area.',
|
||||
required: true,
|
||||
}),
|
||||
resultFileName: Property.ShortText({
|
||||
displayName: 'Result File Name',
|
||||
description:
|
||||
'Specifies the output file name for the cropped image (without extension).',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const image = await jimp.read(context.propsValue.image.data);
|
||||
await image.crop(
|
||||
context.propsValue.left,
|
||||
context.propsValue.top,
|
||||
context.propsValue.width,
|
||||
context.propsValue.height
|
||||
);
|
||||
|
||||
const imageBuffer = await image.getBufferAsync(image.getMIME());
|
||||
|
||||
const fileName =
|
||||
(context.propsValue.resultFileName ?? 'image') +
|
||||
'.' +
|
||||
image.getExtension();
|
||||
|
||||
const imageReference = await context.files.write({
|
||||
fileName: fileName,
|
||||
data: imageBuffer,
|
||||
});
|
||||
|
||||
return imageReference;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Property, createAction } from '@activepieces/pieces-framework';
|
||||
import * as ExifReader from 'exifreader';
|
||||
|
||||
export const getMetaData = createAction({
|
||||
name: 'get_meta_data',
|
||||
description: 'Gets metadata from an image',
|
||||
displayName: 'Get image metadata',
|
||||
props: {
|
||||
image: Property.File({
|
||||
displayName: 'Image',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const tags = await ExifReader.load(context.propsValue.image.data);
|
||||
return tags;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
import { Property, createAction } from '@activepieces/pieces-framework';
|
||||
import mime from 'mime-types';
|
||||
|
||||
export const imageToBase64 = createAction({
|
||||
name: 'image_to_base64',
|
||||
description: 'Converts an image to an url-like Base64 string',
|
||||
displayName: 'Image to Base64',
|
||||
props: {
|
||||
image: Property.File({
|
||||
displayName: 'Image',
|
||||
description: 'The image to convert',
|
||||
required: true,
|
||||
}),
|
||||
override_mime_type: Property.ShortText({
|
||||
displayName: 'Override mime type',
|
||||
description:
|
||||
'The mime type to use when converting the image. In case you want to override the default mime type. Example image/png',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const image = context.propsValue.image;
|
||||
const mimeType = mime.lookup(
|
||||
image.extension ? image.extension : 'image/png'
|
||||
);
|
||||
|
||||
const actualMimeType = context.propsValue.override_mime_type
|
||||
? context.propsValue.override_mime_type
|
||||
: mimeType;
|
||||
return `data:${actualMimeType};base64,${image.base64}`;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,54 @@
|
||||
import { Property, createAction } from '@activepieces/pieces-framework';
|
||||
import jimp from 'jimp';
|
||||
|
||||
export const resizeImage = createAction({
|
||||
name: 'resize_image',
|
||||
description: 'Resizes an image',
|
||||
displayName: 'Resize an image',
|
||||
props: {
|
||||
image: Property.File({
|
||||
displayName: 'Image',
|
||||
required: true,
|
||||
}),
|
||||
width: Property.Number({
|
||||
displayName: 'Width',
|
||||
description: 'Specifies the width of the image.',
|
||||
required: true,
|
||||
}),
|
||||
height: Property.Number({
|
||||
displayName: 'Height',
|
||||
description: 'Specifies the height of the image.',
|
||||
required: true,
|
||||
}),
|
||||
aspectRatio: Property.Checkbox({
|
||||
displayName: 'Maintain aspect ratio for height',
|
||||
required: false,
|
||||
defaultValue: false,
|
||||
}),
|
||||
resultFileName: Property.ShortText({
|
||||
displayName: 'Result File Name',
|
||||
description:
|
||||
'Specifies the output file name for the result image (without extension).',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const image = await jimp.read(context.propsValue.image.data);
|
||||
await image.resize(
|
||||
context.propsValue.width,
|
||||
context.propsValue.aspectRatio ? jimp.AUTO : context.propsValue.height
|
||||
);
|
||||
|
||||
const imageBuffer = await image.getBufferAsync(image.getMIME());
|
||||
|
||||
const imageReference = await context.files.write({
|
||||
fileName:
|
||||
(context.propsValue.resultFileName ?? 'image') +
|
||||
'.' +
|
||||
image.getExtension(),
|
||||
data: imageBuffer,
|
||||
});
|
||||
|
||||
return imageReference;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,49 @@
|
||||
import { Property, createAction } from '@activepieces/pieces-framework';
|
||||
import jimp from 'jimp';
|
||||
|
||||
export const rotateImage = createAction({
|
||||
name: 'rotate_image',
|
||||
description: 'Rotates an image',
|
||||
displayName: 'Rotate an image',
|
||||
props: {
|
||||
image: Property.File({
|
||||
displayName: 'Image',
|
||||
required: true,
|
||||
}),
|
||||
degree: Property.StaticDropdown({
|
||||
displayName: 'Degree',
|
||||
description:
|
||||
'Specifies the degree of clockwise rotation applied to the image.',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ value: 90, label: '90°' },
|
||||
{ value: 180, label: '180°' },
|
||||
{ value: 270, label: '270°' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
resultFileName: Property.ShortText({
|
||||
displayName: 'Result File Name',
|
||||
description:
|
||||
'Specifies the output file name for the result image (without extension).',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const image = await jimp.read(context.propsValue.image.data);
|
||||
await image.rotate(-context.propsValue.degree);
|
||||
|
||||
const imageBuffer = await image.getBufferAsync(image.getMIME());
|
||||
|
||||
const imageReference = await context.files.write({
|
||||
fileName:
|
||||
(context.propsValue.resultFileName ?? 'image') +
|
||||
'.' +
|
||||
image.getExtension(),
|
||||
data: imageBuffer,
|
||||
});
|
||||
|
||||
return imageReference;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"outDir": "../../../../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user