


@echo off @rem nicefit.bat - Nicely fit images to a resolution, replacing black stripes with colors matching the image and add a smooth shadow. @rem License: This batch is in public domain, but the author would appreciate the credits (http://sebsauvage.net). @rem Requirement: This program requires ImageMagick 6.x or later. @rem Syntax: nicefit.bat filename width height outputfilename @rem Example: nicefit.bat myimage.jpg 1280 1024 result.bmp SETLOCAL set filename=%1 set width=%2 set height=%3 set outputfilename=%4 convert ( ( %filename% -gravity Center -crop "80x80%%+0+0" -resize "%width%x" +repage -crop "%width%x%height%+0+0" -resize "x%height%" +repage -crop "%width%x%height%+0+0" -blur 0x40 +repage ) ( %filename% -resize %width%x%height% -matte -background black -shadow 100x16 ) -gravity Center -composite ) ( %filename% -resize %width%x%height% ) -composite -flatten +repage -strip -quality 80 %outputfilename%
nicefit photo.jpg 1280 1024 resultat.jpg



Résultats pour Eviter les bandes noires quand on réduit une image
Résultats pour Eviter les bandes noires quand on réduit une image
Résultats pour Eviter les bandes noires quand on réduit une image
Résultats pour Eviter les bandes noires quand on réduit une image
Résultats pour Eviter les bandes noires quand on réduit une image