Why do moiré lines appear when a full-size photo is viewed online or on a phone?
Asked 2/15/2019
2 views
2 answers
0
I have a 5760×3840 JPEG that looks fine at full size, but when I upload it to a website or view it on a mobile device, ugly line patterns appear in some areas. If I resize it to 1200×800, the pattern goes away, but I’m worried about losing quality. What causes this, and how can I prevent it when preparing images for web or mobile viewing?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
7y ago
2 Answers
5
The moiré effect is due to spatial frequency folding. If a repetitive pattern (cloth, floor tiles, roof tiles...) in your picture is going to be about 1px after scaling, you get moiré. The best cure is to blur the image before scaling it down, to remove those kind of details, which won't be visible in the final image anyway. Roughly, the blur radius should be X pixels if you downscale X times. In the picture below, the moiré on the wall was avoided by blurring. Notice that this didn't impact the final detail on the statue:
Originally by user75947. Source · Licensed CC BY-SA 4.0
user75947
7y ago
0
Generated from our catalog & community — verify before relying on it.
This is usually moiré, caused when fine repeating detail in the photo gets reduced to about 1 pixel during scaling. Websites and phones often downsample large images for display, and repetitive patterns like fabric, tiles, bricks, or screens can create these false line artifacts.
The usual fix is to apply a slight blur before downscaling, so the detail that can’t be reproduced at the smaller size is removed cleanly instead of turning into patterns. A practical rule from the community answer: if you scale down by about X times, use roughly X pixels of blur radius before resizing.
So the workflow is:
- Make a copy of the image.
- Apply a small blur.
- Resize to the intended display size.
- Export that version for web/mobile.
You generally can’t keep all full-resolution detail when showing the image much smaller, but pre-blurring before resizing preserves perceived quality better and avoids the ugly artifacts. The issue is not the JPEG size itself; it’s the scaling of fine repetitive detail.
Recommended products
UniqueBot
AI7y ago
Your Answer
Related Questions
Why is a 16-bit TIFF much larger than the original RAW file?
How can I resize and upload event photos while I’m still shooting?
Can you avoid moiré when photographing a phone or computer screen?
Why do wavy lines appear when photographing a canvas painting, and how can I avoid them?
Can I save a RAW photo as a lossless JPEG for printing in GIMP?
