labmatetools / 8.1 SCALE BAR ● IMAGES STAY ON THIS COMPUTER · NOTHING UPLOADED ALL TOOLS
FIG. 8.1 — IMAGE → BAR → RECORD

Scale Bar

Same bar, right length, every image in the batch — with a record of where the µm per pixel came from.

IMAGES → CALIBRATE → STYLE → CHECK → EXPORT

01 — IMAGES

OR TRY:

02 — CALIBRATION ONE PER MICROSCOPE SET-UP

HOW

From your acquisition software or Fiji (Image › Properties), for the same objective, camera, binning and zoom as these images.

SAVE AS PRESET

Presets are kept in this browser. A preset only holds for images taken with the same objective, camera, binning and zoom and exported at full size.

03 — SCALE BAR SAME ON EVERY IMAGE

LENGTH

CORNER
COLOUR
LABEL
FONT
BACKGROUND

Thickness, text size and margin are a percentage of each image’s shorter side, so the bar looks the same on images of different sizes.

04 — EXPORT

FORMAT
16/32-BIT TIFF

PNG keeps every pixel as it was. JPG is smaller but re-compresses the image. TIFF files are saved as PNG. High-bit-depth TIFFs are mapped to 8 bits for display: MIN–MAX stretches each image’s own range; FULL RANGE maps 0 → black and the type’s maximum → white.

PREVIEW

—
Add images, or try the sample batch.
    WHAT THIS TOOL DOES NOT DO

    Guess the scale from the objective · adjust brightness or contrast of 8-bit images · resize · open .czi, .nd2, .lif, .oib or other vendor formats · Z-stacks. Export those from Fiji or the microscope software first, at full size.

    The ZIP holds every image with its bar, calibration.csv (file, µm/px, where it came from, bar length in µm and px) and your settings as JSON. Originals are never changed.

    REFERENCE · SCALE BAR

    The arithmetic

    QuantityFormula
    Bar length in pixelsbar length (µm) ÷ µm per pixel, rounded to a whole pixel
    µm per pixel from a lineknown length (µm) ÷ line length (px)
    µm per pixel from the camera (estimate)camera pixel (µm) × binning ÷ (objective × adapter / zoom)
    Pixels per µm1 ÷ µm per pixel
    Rounding error|rounded px − exact px| ÷ exact px — flagged above 1%

    Where the µm per pixel comes from

    SourceHow goodRecorded in the CSV as
    Stage micrometer, same set-upbest — measures the real opticsmeasured
    Acquisition software / Fiji valuegood, if the image was not resized after exportentered · or file (ImageJ / OME-TIFF)
    Camera pixel ÷ magnificationestimate — a few percent off is commoncamera estimate
    Objective magnification alonenot usable — depends on camera, binning and zoom—

    Round lengths AUTO chooses from

    SeriesLengths
    1 · 2 · 5 × 10ⁿ… 0.5, 1, 2, 5, 10, 20, 50, 100, 200, 500 µm, 1, 2 mm …
    Targetlargest round length ≤ 20% of the narrowest field in the batch
    Unitnm below 1 µm, mm from 1000 µm

    Files it opens

    FormatSupportedScale read from file
    PNG · JPG · WebP · BMPas the browser shows them (8-bit)PNG pHYs in metres only; print DPI values ignored
    TIFF8 / 16 / 32-bit grey, RGB, palette; uncompressed, LZW, PackBits, Deflate; first page of a stackImageJ / Fiji description + resolution; OME-TIFF PhysicalSizeX; centimetre resolution tag
    Not supportedtiled or BigTIFF; .czi, .nd2, .lif, .oib, .ims and other vendor formats—

    Worked example

    Example. A 2048 × 2048 image from a 6.5 µm camera pixel with a 20× objective and no binning is 0.325 µm/px (a 666 µm field). AUTO picks 100 µm (≤ 20% of 666 µm), drawn as 308 px (307.69 exact, 0.1% off). With 2 × 2 binning the same field is 1024 px wide at 0.65 µm/px, and the 100 µm bar is 154 px.

    LAST UPDATED · HOW VALUES ARE CHECKED · ABOUT LABMATE.TOOLS

    QUESTIONS · SCALE BAR

    Frequently asked

    Are my images uploaded?

    No. Images are opened and drawn on in your browser and never uploaded. Only your calibration presets and bar style are saved, on this device.

    Which image files can it open?

    PNG, JPG, WebP and BMP, plus TIFF: 8-, 16- and 32-bit greyscale, RGB and palette, uncompressed, LZW, PackBits or Deflate. For multi-page TIFF the first page is used. Proprietary formats such as .czi, .nd2, .lif and .oib need exporting from the microscope software or Fiji first.

    How do I find the µm per pixel of my images?

    Best: image a stage micrometer with the same objective, camera, binning and zoom, draw a line across a known distance and let the tool divide. Second best: the value your acquisition software or Fiji (Image › Properties) reports for that configuration.

    Can I work out the scale from the objective magnification alone?

    No. It also depends on the camera’s pixel size, binning, any adapter or zoom, and whether the image was resized after export. The camera method here estimates µm/px = camera pixel × binning ÷ total magnification; confirm it with a stage micrometer.

    Does it change my images?

    It draws the bar (and optional label and background box) onto a copy at the original pixel size. Nothing is resampled or adjusted. 16- and 32-bit TIFFs are converted to an 8-bit display copy, which is noted for each image.

    How long should a scale bar be?

    A round number (1, 2 or 5 × a power of ten) that spans roughly 10–25% of the image width. AUTO picks the largest round length up to 20% of the narrowest field in the batch, so every image gets the same bar.

    How many pixels long is a 50 µm scale bar?

    50 divided by the µm per pixel: 200 px at 0.25 µm/px, 154 px at 0.325 µm/px (153.85 rounded, 0.1% off). The tool shows the exact and rounded length and flags rounding above 1%.

    Can it read the scale saved by Fiji or ImageJ?

    Yes, from TIFFs saved by ImageJ / Fiji and from OME-TIFF PhysicalSizeX. It is shown as a suggestion; you choose whether to use it.