Output Options

CDN

S3 Signed Url

S3 Destination

FTP Destination

Azure Destination

IAM Users

Other Service Signed Urls

Getting Started

Blitline Job

Welcome

Job Options

List of Available Functions

Examples List

Functions

Job Response

Polling and Postbacks

Service Limits

Development Recommendations

Gotchas

Advanced

Pipelines

Fonts

Smart Image

Static IPs

Formats

Colorspace

Color Extraction

PDF

Image Optimization

Metadata

Signed Jobs

Subimage

Special (Non-Image) Processing

Zipping

Trancoding Video Presets

Apache Tika

AWS Rekognition/Facial Recognition

Animated GIFs

Building Gifs or Videos from Images

Find Image on the Internet

Video Keyframes

Video Transcoding

Screenshots of Websites

IM Scripts

Vector Processing

Smart Image

Updated 9 months ago by Blitline Support

SMART IMAGE

A common use of Blitline is to generate thumbnails. These thumbnails are often of various or unpredictable mime types. Blitline processing generally requires special or alternate configuration for filetypes that aren’t standard images. For example, a PDF generally requires different Blitline json that Word Docs, or even .pngs.

Smart Image functionality attempt to unify all these different sources and output an image, without any special Blitline json. When “smart_image” is specified as a “src_type”, Blitline will attempt to generate a proper image based on whatever the mime type of the file is. Even text files will be converted into an image.

Smart Image works similarly to “icons” in an OS, identifying file types and generating a useful thumbnail for them. Smart Image should ALWAYS return an image (assuming there is a valid src file), even if it’s a default image.

HOW DO I USE IT?

You simple add “smart_image” as the “data_type” in your JSON:

          {
              "application_id": "YOUR_APP_ID",
              "v": 1.21,
              "src": "YOUR URL",
              "src_type" : "smart_image",
              "functions": [
                  {
                      "name": "resize_to_fit",
                      "params": {
                          "width": 200,
                          "autosharpen": true
                      },
                      "save": {
                          "image_identifier": "MY_CLIENT_ID"
                      }
                  }
              ]
          }

SAMPLE RESULTS:

THUMBNAIL VIDEOS (OF VARIOUS TYPES)

https://s3.amazonaws.com/blitd...


THUMBNAIL PDFS (FIRST PAGE) AUTOMATICALLY

http://www.pdfiles.com/pdf/fil...


TURN SCRIPTS (OR TEXT) INTO IMAGES

https://raw.githubusercontent....


OFFICE DOCS

EVEN URLS

http://www.stackoverflow.com


IF WE CAN’T RASTERIZE IT…

https://s3.amazonaws.com/blitd...

We’ll give it a default image!


NOTES:

We will be adding more and more supported filetypes as we go along. If you wish to have a particular filetype rendering, please contact us at support@blitline.com!

Gifs are currently not supported as ANIMATED, but will be rasterized into a static image.

How did we do?