At close range the sharp zone of a single photo can be thinner than a ring, a watch or a perfume bottle seen at an angle, and closing the aperture further softens the whole image. Stacking takes a series instead: the first frame is focused on the nearest edge, each following one a little further back, until the far edge is sharp. Software keeps the sharpest part of each frame and blends them. Many cameras and some phone apps can step the focus automatically.
Between frames nothing may change except the focus. The camera stands on a tripod, the product is not touched, and the light stays constant, which rules out a window on a day of passing clouds. Changing focus also changes the framing slightly, and the software aligns the frames for that. The sharp zones of neighbouring frames must overlap; where one step is too large, a soft band runs across the finished product.
Stacking has its own faults. A sharp front edge over a blurred background can leave a halo along the outline. Glass, gemstones, chains that cross themselves and loose fibres that moved between frames confuse the blending and come out smeared or doubled. The merged image is checked at full size along every edge, because a doubled chain link shows a product that does not exist. The plain background is still cleaned or cut out afterwards.
