Image Layers: Allow using a sub-rect of the image

As the topic title states, it would be nice to be able to define a rectangle within an image and use that as the image layer. This would allow using atlases of background images instead of having each one as its own image, or using different sections of one image for different maps.

I’m currently doing this with custom properties on the Image Layer, but I can’t preview what I get within Tiled, and if I use a large atlas, it looks very silly and distracting while editing.

In this situation, you should create a tileset with your image if possible.
And create a tile layer with only one tile : the sub-rect of your image.
Like this, you will be able to preview the result directly on Tiled.

This would not allow me to mix image layers with regular-sized tiles, since Tiled doesn’t allow having different tile sizes per layer. And my background images aren’t necessarily a multiple of the usual tile size.
(I’d also prefer to avoid this for compatibility reasons, my engine doesn’t support multiple tilesets per map xP)

It’s unlikely I’d be adding support for this to the image layer, but I’m definitely interested in supporting tilesets with tiles of various sizes (#1008), which you could then use as tile objects.

Looking forward to that!

Too bad about Image Layers though, they’re convenient for my purposes. I’m using them for hand-drawn background parallax layers, and they are easier to set up (and parse!) than Object Layers containing one Tile Object each, so even without being able to preview them properly, I’d still take the Image Layer approach I think.

If Tiled gets both #1008 and support for variable tile sizes per layer and differing layer sizes per layer, then I think Image Layers will be properly obsolete xP