ByteChef LogoByteChef

Image Helper

Helper component which contains various actions for image manipulation.

Categories: Helpers

Type: imageHelper/v1


Actions

Compress Image

Name: compressImage

Compress image with specified quality.

Properties

NameLabelTypeDescriptionRequired
imageImageFILE_ENTRYThe image file to process.true
qualityQualityNUMBERCompression quality of the image.true
resultFileNameResult File NameSTRINGSpecifies the output file name for the result image.true

Example JSON Structure

{
  "label" : "Compress Image",
  "name" : "compressImage",
  "parameters" : {
    "image" : {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    },
    "quality" : 0.0,
    "resultFileName" : ""
  },
  "type" : "imageHelper/v1/compressImage"
}

Output

Type: FILE_ENTRY

Properties

NameTypeDescription
extensionSTRING
mimeTypeSTRING
nameSTRING
urlSTRING

Output Example

{
  "extension" : "",
  "mimeType" : "",
  "name" : "",
  "url" : ""
}

Crop Image

Name: cropImage

Crops an image to the specified dimensions.

Properties

NameLabelTypeDescriptionRequired
imageImageFILE_ENTRYThe image file to process.true
xX CoordinateINTEGERThe horizontal starting point of the crop area.true
yY CoordinateINTEGERThe vertical starting point of the crop area.true
widthWidthINTEGERWidth of the crop area.true
heightHeightINTEGERHeight of the crop area.true
resultFileNameResult File NameSTRINGSpecifies the output file name for the result image.true

Example JSON Structure

{
  "label" : "Crop Image",
  "name" : "cropImage",
  "parameters" : {
    "image" : {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    },
    "x" : 1,
    "y" : 1,
    "width" : 1,
    "height" : 1,
    "resultFileName" : ""
  },
  "type" : "imageHelper/v1/cropImage"
}

Output

Type: FILE_ENTRY

Properties

NameTypeDescription
extensionSTRING
mimeTypeSTRING
nameSTRING
urlSTRING

Output Example

{
  "extension" : "",
  "mimeType" : "",
  "name" : "",
  "url" : ""
}

Get Image Metadata

Name: getImageMetadata

Get metadata of the image.

Properties

NameLabelTypeDescriptionRequired
imageImageFILE_ENTRYThe image file to process.true
resultFileNameResult File NameSTRINGSpecifies the output file name for the result image.true

Example JSON Structure

{
  "label" : "Get Image Metadata",
  "name" : "getImageMetadata",
  "parameters" : {
    "image" : {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    },
    "resultFileName" : ""
  },
  "type" : "imageHelper/v1/getImageMetadata"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Image to Base64

Name: imageToBase64

Converts image to Base64 string.

Properties

NameLabelTypeDescriptionRequired
imageImageFILE_ENTRYThe image file to process.true

Example JSON Structure

{
  "label" : "Image to Base64",
  "name" : "imageToBase64",
  "parameters" : {
    "image" : {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    }
  },
  "type" : "imageHelper/v1/imageToBase64"
}

Output

Type: STRING

Resize Image

Name: resizeImage

Resizes an image to the specified width and height.

Properties

NameLabelTypeDescriptionRequired
imageImageFILE_ENTRYThe image file to process.true
widthWidthINTEGERThe target width of the image in pixels.true
heightHeightINTEGERThe target height of the image in pixels.true
resultFileNameResult File NameSTRINGSpecifies the output file name for the result image.true

Example JSON Structure

{
  "label" : "Resize Image",
  "name" : "resizeImage",
  "parameters" : {
    "image" : {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    },
    "width" : 1,
    "height" : 1,
    "resultFileName" : ""
  },
  "type" : "imageHelper/v1/resizeImage"
}

Output

Type: FILE_ENTRY

Properties

NameTypeDescription
extensionSTRING
mimeTypeSTRING
nameSTRING
urlSTRING

Output Example

{
  "extension" : "",
  "mimeType" : "",
  "name" : "",
  "url" : ""
}

Rotate Image

Name: rotateImage

Rotates an image by a specified degree.

Properties

NameLabelTypeDescriptionRequired
imageImageFILE_ENTRYThe image file to process.true
degreeDegreeINTEGER
Options 90, 180, 270
Specifies the degree of clockwise rotation applied to the image.true
resultFileNameResult File NameSTRINGSpecifies the output file name for the result image.true

Example JSON Structure

{
  "label" : "Rotate Image",
  "name" : "rotateImage",
  "parameters" : {
    "image" : {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    },
    "degree" : 1,
    "resultFileName" : ""
  },
  "type" : "imageHelper/v1/rotateImage"
}

Output

Type: FILE_ENTRY

Properties

NameTypeDescription
extensionSTRING
mimeTypeSTRING
nameSTRING
urlSTRING

Output Example

{
  "extension" : "",
  "mimeType" : "",
  "name" : "",
  "url" : ""
}

How is this guide?

Last updated on

On this page