print htmlspecialchars(<<Oh, and to do this, I had to hack ffmpeg; namely, disable the condition that triggers "unscaled special converters", because those converters ignore the sws filters alltogether.tmp1.png tmp2.png tmp3.png \ tmp.bmp convert tmp.bmp -type truecolor tmp_lunar.png # The other input is sonic_orgrgb.png. To ensure it gets # precisely the same treatment as the first file, do a dummy # conversion into bmp and back, forcing the PNG type into truecolor. convert sonic_orgrgb.png tmp.bmp convert tmp.bmp -type truecolor tmp_sonic.png # Pick a detail from the Sonic picture - the offset was chosen # intentionally to expose worst-case for nearest-neighbor scaling convert sonic_orgrgb.png -crop 70x80+1+0 tmp.bmp convert tmp.bmp -type truecolor tmp_sonicdetail.png #### ### Converting it with various combinations: for i in neighbor area bicubic lanczos gauss sinc; do for o in neighbor bilinear bicubic lanczos fast_bilinear gauss sinc; do ## Lunar ball false && ffmpeg -y -i "tmp_lunar.png" -vcodec ffv1 -qscale 0.01 \ -sws_flags \$i+full_chroma_inp+full_chroma_int \ tmp.avi false && ffmpeg -y -i tmp.avi \ -sws_flags \$o+full_chroma_inp+full_chroma_int \ tmp1.png # Upscale the image by 300% (point scaling) convert -filter point -resize '300%' tmp1.png tmp.bmp # Convert it into a RGB png and into a grayscale png #convert tmp.bmp -quality 100 -type truecolor RES2-"\$i"-"\$o".png #convert RES2-"\$i"-"\$o".png -type grayscale MONO4-"\$i"-"\$o".png ## Sonic false && ffmpeg -y -i "tmp_sonic.png" -vcodec ffv1 -qscale 0.01 \ -sws_flags \$i+full_chroma_inp+full_chroma_int \ tmp.avi false && ffmpeg -y -i tmp.avi \ -sws_flags \$o+full_chroma_inp+full_chroma_int \ tmp1.png # Upscale the image by 100% (redundant, but done so that # the method is identical here to the above) false && convert -filter point -resize '100%' tmp1.png tmp.bmp # Convert it into a RGB png and into a grayscale png #convert tmp.bmp -quality 100 -type truecolor RESS-"\$i"-"\$o".png #convert RESS-"\$i"-"\$o".png -type grayscale MONOS-"\$i"-"\$o".png ## Sonic detail ffmpeg -y -i "tmp_sonicdetail.png" -vcodec ffv1 -qscale 0.01 \ -sws_flags \$i+full_chroma_inp+full_chroma_int \ tmp.avi ffmpeg -y -i tmp.avi \ -sws_flags \$o+full_chroma_inp+full_chroma_int \ tmp1.png # Upscale the image by 200% convert -filter point -resize '200%' tmp1.png tmp.bmp # Convert it into a RGB png and into a grayscale png convert tmp.bmp -quality 100 -type truecolor RESD-"\$i"-"\$o".png convert RESS-"\$i"-"\$o".png -type grayscale MONOD-"\$i"-"\$o".png done done EOF ); ?>
Other comment: The bilinear output filter looks buggy,
as though it handles scanlines in wrong order.
The fast_bilinear filter has the same problem.
They're so off that I didn't bother including them here.
You can still see them if you like, by editing the URLs.
This problem was fixed by disabling "unscaled special converters".
DECODE: ENCODE: Neighbor Bicubic Lanczos Gauss Sinc Bilinear Weighted score -------------------------------------------------------------------------------- Neighbor 1pts 1pts 1pts 3pts 0pts 1pts 1.05 Area 4pts 8pts 7pts 10pts 7pts 8pts 5.95 2nd Bicubic 4pts 7pts 6pts 9pts 7pts 8pts 5.35 Lanczos 3pts 7pts 7pts 9pts 6pts 8pts 5.20 Gauss 4pts 9pts 10pts 7pts 8pts 8pts 6.30 1st Sinc 2pts 5pts 5pts 8pts 7pts 7pts 4.05 -------------------------------------------------------------------------------- Weight: 50% 15% 10% 5% 5% 15% Weight is based on estimated likelihood of being decoded with that filter.