@echo off

convert bq.png ( -clone 0 -fuzz XX%% -transparent white -blur 0x1 ) -alpha off -compose copy_opacity -composite resultimage.png

exit /b

for %%x in (??.png) do (
  convert %%x -border 2x2 BMP3:%%~nx.bmp
)
