Save Options

Options for output of files

The save node indicates an output operation. The save node will typically include a destination such as an s3_destination or signed_url. If it DOES NOT include a destination, Blitline will output it to a temporary location on Blitline S3. This is useful for testing, but these are shortlived images. In production, please output to your own object store.

The default output from Blitline is a jpeg with 85% compression set.

The save node can contain certain options for saving.

  • image_identifier(required) - This is what the result json will return with information about this saved image.
  • quality - When saving as .jpg , you can default the quality of .jpg you want output. The default is 85%.
  • save_profiles - When saving a file, this indicates if the EXIF data and color profile information should be saved. It is TRUE by default with new accounts (after 2020), for older accounts it's false.
  • png_quantize - We can run a quantize on .png outputs to reduce the colorspace to 8bit and greatly reduce the image size (this has extra cost)
  • image_optim - We will try to optimize the jpg for maximum size reduction
  • max_filesize - We will try to reduce the image to fit within a maximum filesize
  • extension - Sets the extension for the file output (This is only useful for non "destination" nodes. The file extension defined in the "destination" node will override this extension)
  • check_blank - Will output a "is_blank" : true in the results JSON if the resulting saved image is empty or all a single color.

An example of using these would be:

{
  "application_id": "YOUR_APP_ID",
  "src": "http://www.google.com/logos/2011/houdini11-hp.jpg",
  "postback_url": "YOUR_WEBSITE_URL",
  "functions": [
    {
      "name": "blur",
      "save": {
        "image_identifier": "YOUR_IMAGE_IDENTIFIER",
        "extension" : ".png",
        "png_quantize" : true
      }
    }
  ]
}