published: ffprobe -v error -show_entries stream=width,height,pix_fmt -of csv=p=0 cover.png run on in/01-ok-3000.png: 3000,3000,rgb24 exit=0 edge: test file, PNG published: ffprobe -v error -show_entries stream=width,height,pix_fmt -of csv=p=0 cover.png run on in/06-cmyk-3000.jpg: 3000,3000,gbrap exit=0 edge: CMYK JPEG: pix_fmt reads gbrap, same word an alpha PNG gives (see 07) published: ffprobe -v error -show_entries stream=width,height,pix_fmt -of csv=p=0 cover.png run on in/07-alpha-corners-3000.png: 3000,3000,rgba exit=0 edge: PNG with alpha: pix_fmt reads rgba published: ffprobe -v error -show_entries stream=width,height,pix_fmt -of csv=p=0 cover.png run on in/nofile.png: in/nofile.png: No such file or directory exit=1 edge: file that does not exist published: ffmpeg -v error -y -i cover.png -vf "crop=min(iw\,ih):min(iw\,ih),scale=3000:3000:flags=lanczos" -frames:v 1 -update 1 fixed.png run on in/05-nonsquare-3000x2800.png: (no output) exit=0 edge: test file 3000x2800 published: ffmpeg -v error -y -i cover.png -vf "crop=min(iw\,ih):min(iw\,ih),scale=3000:3000:flags=lanczos" -frames:v 1 -update 1 fixed.png run on in/12-portrait-2000x3000.png: (no output) exit=0 edge: portrait 2000x3000 published: ffmpeg -v error -y -i cover.png -vf "pad=max(iw\,ih):max(iw\,ih):(ow-iw)/2:(oh-ih)/2:color=0x141438,scale=3000:3000:flags=lanczos" -frames:v 1 -update 1 fixed.png run on in/05-nonsquare-3000x2800.png: (no output) exit=0 edge: test file 3000x2800 published: ffmpeg -v error -y -i cover.png -vf "pad=max(iw\,ih):max(iw\,ih):(ow-iw)/2:(oh-ih)/2:color=0x141438,scale=3000:3000:flags=lanczos" -frames:v 1 -update 1 fixed.png run on in/12-portrait-2000x3000.png: (no output) exit=0 edge: portrait 2000x3000 published: ffmpeg -v error -y -i cover.png -vf "split[a][b];[a]drawbox=c=0x141438:t=fill[bg];[bg][b]overlay,format=rgb24" -frames:v 1 -update 1 fixed.png run on in/07-alpha-corners-3000.png: (no output) exit=0 edge: test file, transparent corners published: ffmpeg -v error -y -i cover.png -vf "split[a][b];[a]drawbox=c=0x141438:t=fill[bg];[bg][b]overlay,format=rgb24" -frames:v 1 -update 1 fixed.png run on in/07b-alpha-opaque-3000.png: (no output) exit=0 edge: alpha channel present but fully opaque published: ffmpeg -v error -y -i cover.png -pix_fmt yuvj420p -q:v 2 fixed.jpg run on in/06-cmyk-3000.jpg: (no output) exit=0 edge: test file, CMYK JPEG published: ffmpeg -v error -y -i cover.png -pix_fmt yuvj420p -q:v 2 fixed.jpg run on in/11-ok-3000.jpg: (no output) exit=0 edge: already RGB JPEG published: ffmpeg -v error -y -i cover.png -frames:v 1 -update 1 fixed.png run on in/08-webp-3000.webp: (no output) exit=0 edge: test file, WebP published: ffmpeg -v error -y -i cover.png -frames:v 1 -update 1 fixed.png run on in/nofile.webp: Error opening input file in/nofile.webp. Error opening input files: No such file or directory exit=254 edge: file that does not exist published: ffmpeg -v error -y -i cover.png -q:v 2 fixed.jpg run on in/09-png-renamed-3000.jpg: (no output) exit=0 edge: test file, PNG saved under a .jpg name published: ffmpeg -v error -y -i cover.png -vf scale=3000:3000:flags=lanczos -frames:v 1 -update 1 fixed.png run on in/04-large-3001.png: (no output) exit=0 edge: test file 3001x3001 (one pixel over) published: ffmpeg -v error -y -i cover.png -vf scale=3000:3000:flags=lanczos -frames:v 1 -update 1 fixed.png run on in/03-small-1399.jpg: (no output) exit=0 edge: 1399 JPEG scaled up to 3000 (pixels are only enlarged, not restored) published: python3 check-cover.py cover.png run on in/01-ok-3000.png: file: in/01-ok-3000.png | 3000 x 3000 | content type PNG | mode RGB | 85,414 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: test file, passes every rule published: python3 check-cover.py cover.png run on in/02-ok-1400.jpg: file: in/02-ok-1400.jpg | 1400 x 1400 | content type JPEG | mode RGB | 86,823 bytes PASS | square (Apple and Spotify) | 1400 x 1400 PASS | 1400 to 3000 px (Apple, RSS feed) | 1400 x 1400 PASS | PNG or JPEG (Apple, Spotify) | JPEG INFO | Apple's stated Show Cover size is 3000 x 3000; the RSS range is 1400 to 3000 | 1400 x 1400 PASS | no alpha channel (Apple) | mode RGB exit=0 edge: lower bound 1400 JPEG published: python3 check-cover.py cover.png run on in/03-small-1399.jpg: file: in/03-small-1399.jpg | 1399 x 1399 | content type JPEG | mode RGB | 87,161 bytes PASS | square (Apple and Spotify) | 1399 x 1399 FAIL | 1400 to 3000 px (Apple, RSS feed) | 1399 x 1399 PASS | PNG or JPEG (Apple, Spotify) | JPEG PASS | no alpha channel (Apple) | mode RGB exit=1 edge: one pixel under the range published: python3 check-cover.py cover.png run on in/04-large-3001.png: file: in/04-large-3001.png | 3001 x 3001 | content type PNG | mode RGB | 173,972 bytes PASS | square (Apple and Spotify) | 3001 x 3001 FAIL | 1400 to 3000 px (Apple, RSS feed) | 3001 x 3001 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=1 edge: one pixel over the range published: python3 check-cover.py cover.png run on in/05-nonsquare-3000x2800.png: file: in/05-nonsquare-3000x2800.png | 3000 x 2800 | content type PNG | mode RGB | 138,333 bytes FAIL | square (Apple and Spotify) | 3000 x 2800 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 2800 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=1 edge: not square published: python3 check-cover.py cover.png run on in/06-cmyk-3000.jpg: file: in/06-cmyk-3000.jpg | 3000 x 3000 | content type JPEG | mode CMYK | 680,604 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | JPEG PASS | no alpha channel (Apple) | mode CMYK WARN | color mode (not stated in the official pages read) | mode CMYK; export as RGB to be safe exit=0 edge: CMYK JPEG published: python3 check-cover.py cover.png run on in/07-alpha-corners-3000.png: file: in/07-alpha-corners-3000.png | 3000 x 3000 | content type PNG | mode RGBA | 110,682 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG FAIL | no alpha channel (Apple) | mode RGBA exit=1 edge: PNG with transparent corners published: python3 check-cover.py cover.png run on in/07b-alpha-opaque-3000.png: file: in/07b-alpha-opaque-3000.png | 3000 x 3000 | content type PNG | mode RGBA | 98,664 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG FAIL | no alpha channel (Apple) | mode RGBA exit=1 edge: alpha channel present but every pixel opaque published: python3 check-cover.py cover.png run on in/08-webp-3000.webp: file: in/08-webp-3000.webp | 3000 x 3000 | content type WEBP | mode RGB | 58,442 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 FAIL | PNG or JPEG (Apple, Spotify) | WEBP PASS | no alpha channel (Apple) | mode RGB exit=1 edge: WebP published: python3 check-cover.py cover.png run on in/09-png-renamed-3000.jpg: file: in/09-png-renamed-3000.jpg | 3000 x 3000 | content type PNG | mode RGB | 85,414 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG WARN | file name matches content | name says .jpg, content is PNG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: PNG saved under a .jpg name published: python3 check-cover.py cover.png run on in/10-heavy-3000.jpg: file: in/10-heavy-3000.jpg | 3000 x 3000 | content type JPEG | mode RGB | 12,045,502 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | JPEG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: large file, passes every rule published: python3 check-cover.py cover.png run on in/11-ok-3000.jpg: file: in/11-ok-3000.jpg | 3000 x 3000 | content type JPEG | mode RGB | 261,650 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | JPEG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: 3000 x 3000 JPEG, passes every rule published: python3 check-cover.py cover.png run on in/12-portrait-2000x3000.png: file: in/12-portrait-2000x3000.png | 2000 x 3000 | content type PNG | mode RGB | 90,520 bytes FAIL | square (Apple and Spotify) | 2000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 2000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=1 edge: portrait 2000x3000 published: python3 check-cover.py cover.png run on in/nofile.png: no such file: in/nofile.png exit=2 edge: file that does not exist published: python3 check-cover.py cover.png run on /tmp/pcart/empty.png: not an image Pillow can read: cannot identify image file '/tmp/pcart/empty.png' exit=2 edge: empty file, not an image published: python3 check-cover.py cover.png run on fix2/crop.png: file: fix2/crop.png | 3000 x 3000 | content type PNG | mode RGB | 234,192 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: crop published: python3 check-cover.py cover.png run on fix2/pad.png: file: fix2/pad.png | 3000 x 3000 | content type PNG | mode RGB | 155,547 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: pad published: python3 check-cover.py cover.png run on fix2/crop-portrait.png: file: fix2/crop-portrait.png | 3000 x 3000 | content type PNG | mode RGB | 233,845 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: crop-portrait published: python3 check-cover.py cover.png run on fix2/pad-portrait.png: file: fix2/pad-portrait.png | 3000 x 3000 | content type PNG | mode RGB | 143,204 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: pad-portrait published: python3 check-cover.py cover.png run on fix2/flat.png: file: fix2/flat.png | 3000 x 3000 | content type PNG | mode RGB | 159,118 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: flat published: python3 check-cover.py cover.png run on fix2/flat-opaque.png: file: fix2/flat-opaque.png | 3000 x 3000 | content type PNG | mode RGB | 135,882 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: flat-opaque published: python3 check-cover.py cover.png run on fix2/cmyk.jpg: file: fix2/cmyk.jpg | 3000 x 3000 | content type JPEG | mode RGB | 166,625 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | JPEG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: cmyk published: python3 check-cover.py cover.png run on fix2/rgb-again.jpg: file: fix2/rgb-again.jpg | 3000 x 3000 | content type JPEG | mode RGB | 163,679 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | JPEG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: rgb-again published: python3 check-cover.py cover.png run on fix2/webp.png: file: fix2/webp.png | 3000 x 3000 | content type PNG | mode RGB | 269,752 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: webp published: python3 check-cover.py cover.png run on fix2/renamed.jpg: file: fix2/renamed.jpg | 3000 x 3000 | content type JPEG | mode RGB | 258,234 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | JPEG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: renamed published: python3 check-cover.py cover.png run on fix2/big.png: file: fix2/big.png | 3000 x 3000 | content type PNG | mode RGB | 219,798 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: big published: python3 check-cover.py cover.png run on fix2/small-up.png: file: fix2/small-up.png | 3000 x 3000 | content type PNG | mode RGB | 903,800 bytes PASS | square (Apple and Spotify) | 3000 x 3000 PASS | 1400 to 3000 px (Apple, RSS feed) | 3000 x 3000 PASS | PNG or JPEG (Apple, Spotify) | PNG PASS | no alpha channel (Apple) | mode RGB exit=0 edge: output of the fix command: small-up