Image

Runs in your browser. No file uploads for processing.

Roblox ImageRectOffset and ImageRectSize Calculator

Calculate ImageRectOffset and ImageRectSize for a Roblox UI sprite, with a pixel-edge check for resized sheets.

Loading tool...

Making Roblox UI? Try the original six-icon example. Export individual PNG tiles instead.

How to calculate a sprite’s Roblox rectangle

  1. Measure your grid

    Enter the source sheet and sprite dimensions. Use pixel margins from the upper-left corner and gaps between adjacent sprite boxes.

  2. Choose a row and column

    Counting starts at 1. On the 70 × 45 sample, with an 18 × 16 sprite, 5 px starting margins and 3 px gaps, column 3 and row 2 give offset (47, 24).

  3. Copy the rectangle

    Paste the two property assignments into Luau where icon is an ImageLabel or ImageButton using the atlas. If you know the actual uniformly scaled or stretched image dimensions, enter both to check whether all four edges still land on integer pixels.

Use cases

  • Map a regular sprite sheet to Roblox ImageLabels without hand-counting the margins for each icon.
  • Check whether a confirmed atlas resize preserves a sprite’s bounding pixels before changing existing UI coordinates.

Limits and privacy

  • Regular, untrimmed, unrotated grids only; up to 32,768 pixels per dimension and a row or column number up to 256. Not an atlas packer, image editor, or Roblox uploader.
  • The optional calculation assumes the entire image was proportionally stretched along each axis, not cropped, padded, or repacked. Fractional edges are reported instead of silently rounded. The tool cannot inspect the dimensions Roblox uses.

The tool processes inputs in your browser. Account features and usage analytics are separate.

Frequently asked questions

Can I export my sprites as separate files instead?

Use the Sprite Sheet Splitter to cut the original atlas, preserve transparency, and download the tiles in one ZIP. That is distinct from calculating coordinates for keeping one atlas.

What is the difference between ImageRectOffset and ImageRectSize?

Offset is a sprite’s top-left (x, y) location within the source image. Size is the width and height of the selected rectangle in pixels, not the size of the on-screen label.

What if my imported image has different dimensions?

If you know the actual dimensions and the entire image was resized without cropping or padding, enter both dimensions. The tool uses the exact scale on each axis and checks if all edges still land on whole pixels.

Why does the tool refuse to round fractional edges?

Rounding can trim an edge or include pixels from a neighboring sprite. Repack or resize the grid to integer boundaries, then use the exact dimensions of the updated asset.

Does this send my sprite sheet to Roblox?

No. The calculator only uses dimensions entered in your browser. It does not accept image files, connect to Roblox, or publish assets.

Related tools