---
updatedAt: 2025-07-02T17:19:09.000Z
agentTools:
  projectIndex: https://readme.blitline.com/llms.txt
---

# Uncommon Functions

These are the lesser of used functions. These are useful for very specialized operations.

## APPEND

Append images together either horizontally or vertically

```json
{
  "name": "append",
  "params": {
    "other_images": "http://placekitten.com/421/540,http://placekitten.com/422/540",
    "vertical": false
  }
}
```

Optional:

* **vertical** : Whether images are appended vertically(true) or horizontally(false)
* **other\_images** : Comma separated list of urls to other images

[EXAMPLE:](http://www.blitline.com/docs/gist_runner?gist_id=5437148)

<hr />

<br />

<br />

## AUTO ENHANCE

Automatically ‘enhances’ (magic wand) an image.

```json
{
  "name": "auto_enhance"
}
```

<hr />

<br />

<br />

## BACKGROUND COLOR

Sets a transparent background color to be a solid (useful when converting pngs to jpgs)

```json
{
    "name":"background_color",
    "params":{}
}
```

Optional:

* **color**: Color you want for the background color (defaults to '#ffffff')

## BLUR

Blurs an image using Guassian blur.

```json
{
  "name": "blur"
}
```

Optional:

* **sigma** : Gaussian sigma of blur (defaults to 1.0)
* **radius** : Gaussian radius of blur (defaults to 0.0)}

<hr />

<br />

<br />

## CROP

Crop an image to a specific size. **Note**: This is not used very often. You are probably looking for "[resize\_to\_fill](https://readme.blitline.com/docs/common-functions#resize-to-fill)"

```json
{
  "name": "crop",
  "params": {
    "x": 0,
    "y": 0,
    "width": 10,
    "height": 10
  }
}
```

Optional:

* **height**: Height of resulting image
* **x**: X offset
* **y**: Y offset
* **preserve\_aspect\_if\_smaller**: If source image is smaller than target size, crop smaller image to still be same aspect ratio (default false)
* **gravity**: Sets the starting gravity of where the x,y will offset from

Required:

* **width**:  Width of resulting image

## DESKEW

Deskews an image (if it's slightly misaligned). Useful for images of documents.

```json
{
  "name": "deskew",
  "params": {}
}
```

Optional:

* **threshold** : Maximum threshold percentage for deskewing (Default = 0.40)
  <hr />
  <br />
  <br />

## DENSITY

Changes the exif density and will resize based on current set density

```json
{   
  "name":"density",    
  "params":
    {        
      "dpi":"200"    
    }
}
```

Required:

* **dpi** : Sets the DPI of the image
  <hr />
  <br />
  <br />

## DESPECKLE

Reduces the speckle noise while preserving the edges

```json
{
  "name": "despeckle",
  "params": {}
}
```

<hr />

<br />

<br />

## DISSOLVE

Composites with transparency

```json
{
  "name": "dissolve",
  "params": {
    "src": "http://mysite/image_to_overlay",
    "src_percentage": 0.3
  }
}
```

Required:

* **src** : Url of image you wants composited on top of original image

Optional:

* **scale\_to\_fit** : \{ “width” : width, “height” : height }, to automatically scale src to fit within specific size. Can also be percentage if suffixed with '%' (eg. '50%')
* **scale\_to\_fill** : \{ “width” : width, “height” : height }, to automatically scale src to fill the area defined. Can also be percentage if suffixed with '%' (eg. '50%')
* **scale\_to\_match** : “true” or “false” to automatically scale src to the same size as current image (defaults to false)
* **as\_mask** : “true” or “false” to use src as a greyscale mask (defaults to false)
* **x** : X offset of where to place image on original image
* **y** : Y offset of where to place image on original image
* **gravity** : Instead of x,y you could use gravity.
* **src\_percentage** : Percentage (0.0-1.0) of alpha on overlayed image (default 0.25)
* **dst\_percentage** : Percentage (0.0-1.0) of alpha on original (bottom) image (default 1.0)

[EXAMPLE:](http://www.blitline.com/docs/gist_runner?gist_id=8200526)

<hr />

<br />

<br />

## IMAGE GRID

Builds a grid of input images

```json
{
	"name": "image_grid",
	"params": {
		"images": ["https://s3.amazonaws.com/img.blitline/skysmall.jpg", "https://unsplash.it/200/300/?random", "https://unsplash.it/200/300/?random", "https://unsplash.it/200/300/?random", "https://unsplash.it/200/300/?random", "https://unsplash.it/200/300/?random"],
		"cell_width": 200,
		"cell_height": 200,
		"columns": 3,
		"padding": 2,
		"color": "#ffda5a"
	}
}
```

Required:

* **images** : Array of images to be placed into the grid
* **cell\_width** : Width of cell to output
* **cell\_height** : Height of cell to output
* **columns** : Number of columns to display

Optional:

* **padding** : Padding between cells
* **color** : Color of padding

[EXAMPLE](https://www.blitline.com/v3/home/gist?gist_id=af4943b5e1297b5214494d2ed600e7a5)

<hr />

<br />

<br />

## LINE

Draws a linear line between two points.

```json
{
    "name":"line",
    "params":{
        "x":10,
        "y":10,
        "x1":50,
        "y1":50,
        "width":1,
        "color":"#ffffff",
        "opacity":1.0,
        "line_cap":"butt"
    }
}
```

Optional:

* **width**: Width of line (default 1)
* **color**: Color of line (default "#ffffff")
* **opacity**: Opacity of line (default 1.0)
* **line\_cap**: How the line ends. Only relevant for widths > 1. Two possible options are "butt"(default) and "round"(rounds ends).

Required:

* **x**: Starting X coordinate
* **y**: Starting Y coordinate
* **x1**: Ending X coordinate
* **y1**: Ending Y coordinate

## LIQUID RESCALE

Uses seam carving to reduce image size

```text
{
  "name": "liquid_rescale",
  "params": {
    "width": 1000,
    "height": 1000
  }
}
```

Required:

* **width** : Target width
* **height** : Target height

Optional:

* **delta\_x** : Maximum seam transversal step (default 0)
* **rigidity** : Bias for non-straight seams (default 0)

[EXAMPLE](http://www.blitline.com/docs/gist_runner?gist_id=5778e028450aece00814)

<hr />

<br />

<br />

## PAD

Add empty space to one side or all sides of image (Useful for centering an image on a new canvas color)

```json
{
  "name": "pad",
  "params": {
    "size": 30
  }
}
```

Required:

* **size** : Thickness of padding

Optional:

* **gravity** : Location of padding (default “CenterGravity”)
* **color** : Color of padding (default “#ffffff”)

[EXAMPLE](http://www.blitline.com/docs/gist_runner?gist_id=5437331)

<hr />

<br />

<br />

## PIXELATE

Pixelates an area on an image (blurs out an area and makes it look like pixels are blurred)

![1438](https://files.readme.io/ad6a9c7-Xnip2021-07-20_17-48-25.jpg "Xnip2021-07-20_17-48-25.jpg")

```json
{
  "name": "pixelate",
  "params": {
    "size": 30
  }
}
```

Optional:

* **x** : X position of starting area on image (default 0)
* **y** : Y position of starting area on image (default 0)
* **width** : Width of area to pixelate (defaults to width of original image)
* **height** : Height of area to pixelate (defaults to height of original image)
* **amount** : 1-100 value representing the amount to pixelate

[EXAMPLE](http://www.blitline.com/docs/gist_runner?gist_id=6380380)

<hr />

<br />

<br />

## ROTATE

Rotates the image.

```json
{
  "name": "rotate",
  "params": {
    "amount": 90
  }
}
```

Required:

* **amount** : The number of degrees to rotate the image.
  <hr />
  <br />
  <br />

## SCRIPT

Run your own scripts on Blitline cloud servers. Perfect for using your own ImageMagick scripts

```json
{
  "name": "script",
  "params": {
    "bash_string": "convert input.png -trim output.png"
  }
}
```

Optional:

* **bash\_string** : String representation of a bash file that will execute on the server (requires NO ‘executable’ or ‘files)
* **files** : Extra files to download before the script is run (requires ‘executable’)
* **executable** : Command line to run script (requires ‘files’)

Example: <http://www.blitline.com/docs/scripts>

<hr />

<br />

<br />

## TRIM

Makes a ‘best guess’ crop to upper-left and lower-right corners. For example, if you have an image with a bunch of white border around it, and you want it cropped to only where there something other than the border color.

```json
{
  "name": "trim",
  "params": {}
}
```

Optional:

* **fuzz** : Fuzz the trimming edge. For JPEGs, due to compression or anti-aliasing often times edges aren’t a clean line. The “fuzz” values allows you to trim with a slight extra fuzz around the trim area. (Defaults to 0.0, valid values are 0.0 - 1.0)

<hr />

<br />

<br />

## UNSHARP MASK

Sharpens an image

```json
{
  "name": "unsharp_mask",
  "params": {}
}
```

Optional:

* **sigma** : Gaussian operator (defaults to 1.0)
* **radius** : Gaussian operator (defaults to 0.0)
* **amount** : The percentage of the blurred image to be added to the receiver, specified as a fraction between 0 and 1.0 (defaults to 1.0)
* **threshold** : The threshold needed to apply the amount, specified as a fraction between 0 and 1.0 (defaults to 0.05)}

<hr />