# pad-photo-for-instagram-without-cropping test log, run 2026-11-25 (UTC) # ffmpeg: ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers ## 1. Photos (CC0, Wikimedia Commons; sha256 in sources.txt) landscape-16x9.jpg 2688x1512 587ea1e57936 landscape-3x2.jpg 2048x1365 b09f5fb62789 panorama.jpg 3040x864 c3ece9823a67 portrait-2x3.jpg 3776x5632 01866ee2aab6 ## 2. Controls (known answers before the run) control A: solid red 1920x1080 into 1080x1920; the calculator's own worked example says scaled 1080x608, bars 656 top and bottom, fills 31.6% measured (WxH top bottom left right): 1080 1920 656 656 0 0 control B: same red image into 1920x1080 (exact fit); expected no bars: 1920 1080 0 0 0 0 control C: an all-white image has no content to find; the scanner must say so (top row count = height 360): 640 360 360 0 0 0 ## 3. Calculator on the live site (Playwright), all 20 photo and canvas pairs plus control A 1920x1080:1080x1920 => bar=letterbox (bars top and bottom) | scaled=1080 × 608 | thickness=656 px top and bottom | fills=31.6% of the canvas 2688x1512:1080x1080 => bar=letterbox (bars top and bottom) | scaled=1080 × 608 | thickness=236 px top and bottom | fills=56.3% of the canvas 2688x1512:1080x1350 => bar=letterbox (bars top and bottom) | scaled=1080 × 608 | thickness=371 px top and bottom | fills=45.0% of the canvas 2688x1512:1080x1920 => bar=letterbox (bars top and bottom) | scaled=1080 × 608 | thickness=656 px top and bottom | fills=31.6% of the canvas 2688x1512:1080x566 => bar=pillarbox (bars left and right) | scaled=1006 × 566 | thickness=37 px each side | fills=93.2% of the canvas 2688x1512:1080x1440 => bar=letterbox (bars top and bottom) | scaled=1080 × 608 | thickness=416 px top and bottom | fills=42.2% of the canvas 2048x1365:1080x1080 => bar=letterbox (bars top and bottom) | scaled=1080 × 720 | thickness=180 px top and bottom | fills=66.7% of the canvas 2048x1365:1080x1350 => bar=letterbox (bars top and bottom) | scaled=1080 × 720 | thickness=315 px top and bottom | fills=53.3% of the canvas 2048x1365:1080x1920 => bar=letterbox (bars top and bottom) | scaled=1080 × 720 | thickness=600 px top and bottom | fills=37.5% of the canvas 2048x1365:1080x566 => bar=pillarbox (bars left and right) | scaled=849 × 566 | thickness=115 px each side | fills=78.6% of the canvas 2048x1365:1080x1440 => bar=letterbox (bars top and bottom) | scaled=1080 × 720 | thickness=360 px top and bottom | fills=50.0% of the canvas 3040x864:1080x1080 => bar=letterbox (bars top and bottom) | scaled=1080 × 307 | thickness=387 px top and bottom | fills=28.4% of the canvas 3040x864:1080x1350 => bar=letterbox (bars top and bottom) | scaled=1080 × 307 | thickness=522 px top and bottom | fills=22.7% of the canvas 3040x864:1080x1920 => bar=letterbox (bars top and bottom) | scaled=1080 × 307 | thickness=807 px top and bottom | fills=16.0% of the canvas 3040x864:1080x566 => bar=letterbox (bars top and bottom) | scaled=1080 × 307 | thickness=130 px top and bottom | fills=54.2% of the canvas 3040x864:1080x1440 => bar=letterbox (bars top and bottom) | scaled=1080 × 307 | thickness=567 px top and bottom | fills=21.3% of the canvas 3776x5632:1080x1080 => bar=pillarbox (bars left and right) | scaled=724 × 1080 | thickness=178 px each side | fills=67.0% of the canvas 3776x5632:1080x1350 => bar=pillarbox (bars left and right) | scaled=905 × 1350 | thickness=87 px each side | fills=83.8% of the canvas 3776x5632:1080x1920 => bar=letterbox (bars top and bottom) | scaled=1080 × 1611 | thickness=155 px top and bottom | fills=83.9% of the canvas 3776x5632:1080x566 => bar=pillarbox (bars left and right) | scaled=379 × 566 | thickness=350 px each side | fills=35.1% of the canvas 3776x5632:1080x1440 => bar=pillarbox (bars left and right) | scaled=965 × 1440 | thickness=57 px each side | fills=89.4% of the canvas ## 4. ffmpeg padding measured by pixel scan, against the calculator photo | canvas | tool says (scaled, bar px, fills) | ffmpeg measured (content, top/bottom, left/right, fills) | match | ssim whole-photo | ssim 10%-cropped control landscape-16x9 2688x1512 | 1080x1080 | 1080x608, 236, 56.3% | 1080x608, 236/236, 0/0, 56.3% | MATCH | 1.0000 | 0.3557 landscape-16x9 2688x1512 | 1080x1350 | 1080x608, 371, 45.0% | 1080x608, 371/371, 0/0, 45.0% | MATCH | 1.0000 | 0.3557 landscape-16x9 2688x1512 | 1080x1920 | 1080x608, 656, 31.6% | 1080x608, 656/656, 0/0, 31.7% | MATCH | 1.0000 | 0.3557 landscape-16x9 2688x1512 | 1080x566 | 1006x566, 37, 93.2% | 1006x566, 0/0, 37/37, 93.1% | MATCH | 1.0000 | 0.3619 landscape-16x9 2688x1512 | 1080x1440 | 1080x608, 416, 42.2% | 1080x608, 416/416, 0/0, 42.2% | MATCH | 1.0000 | 0.3557 landscape-3x2 2048x1365 | 1080x1080 | 1080x720, 180, 66.7% | 1080x720, 180/180, 0/0, 66.7% | MATCH | 1.0000 | 0.3146 landscape-3x2 2048x1365 | 1080x1350 | 1080x720, 315, 53.3% | 1080x720, 315/315, 0/0, 53.3% | MATCH | 1.0000 | 0.3146 landscape-3x2 2048x1365 | 1080x1920 | 1080x720, 600, 37.5% | 1080x720, 600/600, 0/0, 37.5% | MATCH | 1.0000 | 0.3146 landscape-3x2 2048x1365 | 1080x566 | 849x566, 115, 78.6% | 849x566, 0/0, 115/116, 78.6% | MATCH | 1.0000 | 0.3066 landscape-3x2 2048x1365 | 1080x1440 | 1080x720, 360, 50.0% | 1080x720, 360/360, 0/0, 50.0% | MATCH | 1.0000 | 0.3146 panorama 3040x864 | 1080x1080 | 1080x307, 387, 28.4% | 1080x307, 386/387, 0/0, 28.4% | MATCH | 1.0000 | 0.6191 panorama 3040x864 | 1080x1350 | 1080x307, 522, 22.7% | 1080x307, 521/522, 0/0, 22.7% | MATCH | 1.0000 | 0.6191 panorama 3040x864 | 1080x1920 | 1080x307, 807, 16.0% | 1080x307, 806/807, 0/0, 16.0% | MATCH | 1.0000 | 0.6191 panorama 3040x864 | 1080x566 | 1080x307, 130, 54.2% | 1080x307, 129/130, 0/0, 54.2% | MATCH | 1.0000 | 0.6191 panorama 3040x864 | 1080x1440 | 1080x307, 567, 21.3% | 1080x307, 566/567, 0/0, 21.3% | MATCH | 1.0000 | 0.6191 portrait-2x3 3776x5632 | 1080x1080 | 724x1080, 178, 67.0% | 724x1080, 0/0, 178/178, 67.0% | MATCH | 1.0000 | 0.2344 portrait-2x3 3776x5632 | 1080x1350 | 905x1350, 87, 83.8% | 905x1350, 0/0, 87/88, 83.8% | MATCH | 1.0000 | 0.2517 portrait-2x3 3776x5632 | 1080x1920 | 1080x1611, 155, 83.9% | 1080x1611, 154/155, 0/0, 83.9% | MATCH | 1.0000 | 0.2669 portrait-2x3 3776x5632 | 1080x566 | 379x566, 350, 35.1% | 379x566, 0/0, 350/351, 35.1% | MATCH | 1.0000 | 0.1873 portrait-2x3 3776x5632 | 1080x1440 | 965x1440, 57, 89.4% | 965x1440, 0/0, 57/58, 89.4% | MATCH | 1.0000 | 0.2572 summary: 20 of 20 photo/canvas pairs match the calculator (scaled size, one bar side, fill within 0.15 points); 0 differ ## 5. Koldflux Resize image for Instagram Feed (live tool) on two of the photos: does it pad or crop? landscape-3x2.jpg => landscape-3x2-feed.jpg (suggested landscape-3x2-1080x1350.jpg) portrait-2x3.jpg => portrait-2x3-feed.jpg (suggested portrait-2x3-1080x1350.jpg) landscape-3x2 tool output: 1080x1350; scan (WxH top bottom left right): 1080 1350 0 0 0 0 portrait-2x3 tool output: 1080x1350; scan (WxH top bottom left right): 1080 1350 0 0 0 0 landscape-3x2: share of the photo kept by a 4:5 cover crop: width 53.3%, height 100.0% (area lost 46.7%); ssim tool vs centre cover crop 0.9216; ssim tool vs padded version (control, should be low) 0.4422 portrait-2x3: share of the photo kept by a 4:5 cover crop: width 100.0%, height 83.8% (area lost 16.2%); ssim tool vs centre cover crop 0.9813; ssim tool vs padded version (control, should be low) 0.4441 ## 6. Similarity of the cut-edge control, all 20 pairs: lowest 0.19, highest 0.62 (n=20) ## 7. Ratios (ratios.py) landscape-3x2.jpg 2048x1365 ratio 1.5004 (about 1.50) inside 0.75 to 1.91 landscape-16x9.jpg 2688x1512 ratio 1.7778 (about 1.78) inside 0.75 to 1.91 panorama.jpg 3040x864 ratio 3.5185 (about 3.52) outside 0.75 to 1.91 portrait-2x3.jpg 3776x5632 ratio 0.6705 (about 0.67) outside 0.75 to 1.91 canvas 1080x1080 1080x1080 ratio 1.0000 (about 1.00) inside 0.75 to 1.91 canvas 1080x1350 1080x1350 ratio 0.8000 (about 0.80) inside 0.75 to 1.91 canvas 1080x1440 1080x1440 ratio 0.7500 (about 0.75) inside 0.75 to 1.91 canvas 1080x566 1080x566 ratio 1.9081 (about 1.91) inside 0.75 to 1.91 canvas 1080x1920 1080x1920 ratio 0.5625 (about 0.56) outside 0.75 to 1.91 1080 / 1.91 = 565.4 high at 1.91:1; 1080 / 0.75 = 1440 high at 3:4