It was only recently that we released our /file/hash Robot, and it's already time for us to announce the release of our next Robot - /image/merge.

As you may have already guessed this Robot will take several images provided to it, and well... merges them. It'll output a single sprite sheet with all of your input images in an either horizontal or vertical line.

Let's take a closer look 🔎

/image/merge Robot

Creating a Template

The /image/merge Robot pairs great with /image/resize. We'll be taking advantage of this in our Template below, to resize all of our images to the same dimensions to keep our spritesheet uniform.

Inside of our merge Step, we use the bundle_steps parameter to process all of our resized images in one batch. We'll also use the border parameter to put a small amount of padding between each of our images.

{
  "steps": {
    "resize": {
      "use": ":original",
      "robot": "/image/resize",
      "height": "500",
      "width": "750",
      "resize_strategy": "fillcrop"
    },
    "merge": {
      "use": {
        "steps": ["resize"],
        "bundle_steps": true
      },
      "border": 10,
      "direction": "horizontal",
      "format": "png",
      "robot": "/image/merge"
    }
  }
}

After feeding it a few stock images, we end up with this result. It's really as easy as that.

Several stock images in a horizontal line

That's all folks!

Well, this is the end of our brief glimpse into the /image/merge Robot today. We'd love to see how you incorporate this into your workflow, and we'd be interested to hear your feedback on it!