Getting Started

​ ​Welcome

Blitline Job

Job Response

Job Options

Functions

Polling and Postbacks

Gotchas

Development Recommendations

Service Limits

Examples List

List of Available Functions

Output Options

S3 Destination

IAM Users

S3 Signed Url

Azure Destination

FTP Destination

Other Service Signed Urls

CDN

Advanced

Metadata

Colorspace

Color Extraction

Static IPs

Signed Jobs

Formats

Pipelines

Image Optimization

Smart Image

PDF

Fonts

Subimage

Special (Non-Image) Processing

AWS Rekognition/Facial Recognition

Apache Tika

Vector Processing

Animated GIFs

Screenshots of Websites

IM Scripts

Video Keyframes

Zipping

​ ​Trancoding Video Presets

​ ​Video Transcoding

Colorspace

Updated a month ago ​by Blitline Support

COLORSPACE

Blitline supports the conversion of colorspaces on images and other various file formats such as PDF and vector.

The typical desire is to normalize images into an sRGB colorspace so that they appear properly on all devices.

To convert src files to sRGB by adding a

"src_data" : { "colorspace": "srgb" }

…to the base JSON. This tells Blitline to convert to sRGB upon loading the file. Resulting outputted files will then be in the rgb colorspace.


So, for example:

{
  "application_id": "YOUR_APP_ID",
  "src" : "https://s3.amazonaws.com/blitdoc/pdfs/seattle_cmyk.pdf",
  "v" : 1.2,
  "src_data": {"colorspace":"srgb"},
   "functions" :
  [{
    "name": "resize_to_fit",
    "params" : { "width" : 300 },
      "save" : {
        "image_identifier" : "external_sample_1"
      }
  }]
}

The output image will now have an rgb colorspace.


How did we do?