Median · mean · lighten · darken · comet trails

Photo Stacker

Combine 2 to 50 frames of one scene into a single picture: empty out a crowded street, calm noise, or draw star trails. Frames that do not match the first one are named and left out.

Frames in order

2 to 50 photos

Drop the frames here or click to choose

PNG, JPG, WEBP, GIF or BMP, up to 25 MB each. New frames are ordered by file name with numbers read as numbers.

    Mode and settings

    Each pixel takes the middle value across the frames, so anything that is in a place for less than half of them disappears. Keeps all frames in memory.

    1 is identical. Frames of one scene usually score 0.6 to 0.95; a different scene scores under 0.2.

    Stack and save

    Result

    Add the frames of one scene.

    Photo Stacker

    Operator: Abdulla Al Fahad. How tools are built and checked

    Anything that is not in the same place in more than half of your frames vanishes from a median stack, which is why a dozen handheld shots of a busy square can give a picture of an empty one. The same pile of frames, combined a different way, gives a smoother river, a quieter night sky or a sky full of star trails.

    Key features

    • Five modes: median, mean, lighten (maximum), darken (minimum) and lighten with a comet fade
    • 2 to 50 frames, reorderable, sorted on entry by file name with numbers read as numbers
    • Alignment of every frame to the first by shift and scale, switchable off for tripod shots and for star trails
    • A match score per frame against the first, a limit you can set from 0.05 to 0.9, and a table naming each frame that was left out
    • Median computed tile by tile in a worker, with Cancel, under a 120-megapixel total budget

    Stack modes, alignment and the memory budget

    Frames must have the same shape, within 3% of the first photo's aspect ratio, and are brought to one working size of at most 4096 px on the long side. A frame of another shape is skipped on entry with its dimensions in the message.

    The median needs every frame in memory at once, so the total of frames times pixels is held to 120 megapixels. The other modes keep only a running result and do not need the cap.

    How it works

    Median takes, for each pixel and each channel, the middle value of that pixel across all used frames. A person who walks through the shot sits in any one place for only a frame or two, so the middle value is the street behind them.

    Mean adds the frames and divides, and random noise drops roughly with the square root of the number of frames: 16 frames cut it to about a quarter. Lighten keeps the brightest value at each pixel, so a star that moves between frames leaves a line. Comet mode dims everything already stacked by a fixed fraction before adding each new frame, so the oldest trail is faintest.

    Each frame is fitted to the first by a shift and a small scale change. An edge-pattern comparison with the first frame then decides whether the fit is trusted, and a frame below the limit is left out of the stack and named in the table.

    Common use cases

    • Seven frames of a tourist square from a tripod at 6000 × 4000 px: all seven fit in the budget at 4096 × 2731, and the median leaves the square empty apart from the statue.
    • Thirty 20-second exposures of the night sky at 6000 × 4000 px in Lighten mode with Align off, so the stars stay as arcs.
    • Fifty frames of a waterfall in Mean mode, giving the smooth silky look without a neutral density filter.

    How to use this tool

    1. Drop the frames and check the order, which only matters for the comet fade.
    2. Choose the mode (median to remove movement, mean for noise, lighten for trails) and leave Align frames on for handheld sequences, off for tripod shots.
    3. Press Stack photos, then read the table for frames that were left out.

    Example

    An illustrative set: 12 handheld frames of a crowded square, 6000 × 4000 px each, Median mode

    Twelve frames with camera-style names, loaded together. The sizes are an example for working out the limits, not a real shoot.

    Size the page works at, and what it does with a frame from another scene

    Median: 3873 × 2582 px (it holds every frame in memory, so 12 frames share 120 megapixels)
    Mean, Lighten, Darken or Comet on the same 12 frames: 4096 × 2731 px
    A 13th frame taken from a different street: left out, with "could not be lined up with the first photo" and its match score against the 0.30 needed

    Tips for best results

    • In comet mode with 30 frames and the default 92% memory, the oldest frame keeps 8.9% of its brightness, which is a visible but faint tail; 97% keeps 41% and gives long, bright trails.
    • Night skies have few edges for the match check to compare, so switch the check off or lower the limit to 0.1 before blaming the frames.
    • Shoot the same number of frames in the same exposure; the median only removes what moves, not what changes brightness.
    • For star trails, keep the gap between exposures to a second or less, so each arc is a continuous line rather than a row of dots.

    Common pitfalls

    Median needs the movers to be in different places in most frames. A queue that stands still for ten frames out of twelve stays in the picture.

    Alignment fits shift and scale but not rotation. Frames shot with a tilting camera will blur at the edges whatever the score.

    Lighten and comet stack the brightest pixels, so a plane's blinking light, hot pixels and sensor noise all become lines or dots; take a dark frame set for long exposures.

    Common errors and how to fix them

    "No photo could be used"
    Every frame failed the match check against the first. Lower the limit, switch the check off, or start from a frame that represents the scene better.
    The stack stops with a message about running out of memory
    Median keeps every frame in memory at once. Use fewer frames, or switch to Mean, Lighten, Darken or Comet, which keep only a running result.
    A frame is rejected although it looks identical to the first
    A dark scene has few edges to compare. Switch the match check off or lower the limit; the table shows each frame's score.
    "has a different shape from the first photo"
    Re-export that frame with the same crop and orientation as the others, or remove it.

    Best practices

    • Choose the sharpest, most representative frame as the first, since every other frame is aligned and scored against it.
    • For star trails, shoot continuously with the shortest gap your camera allows, so the arcs are not dotted.

    Why the median is computed in tiles

    A median needs all the values of one pixel together, which for 50 frames means sorting 50 numbers per channel for every pixel. The worker computes it in strips of the image so the working buffers stay small, and it can be cancelled without waiting for the whole picture. The frames themselves are still all held, which is what the 120-megapixel budget protects.

    Frequently asked questions

    Why do star trails come out shorter when Align frames is on?

    Alignment pulls each frame back onto the first one. If the match check locks onto the stars, it undoes the very movement that makes the arc, so trail sequences are meant to be stacked with alignment off and a fixed tripod.

    Is this the same as focus stacking?

    No. Focus Stacking picks the sharpest frame for each region of a shot taken at different focus distances. This page combines frames of the same focus by statistics, and does not pick by sharpness.