07. Convert all BMP under folder (including subdirectories) to JPG

Source: Internet
Author: User

XnView Browser: Tools-Batch conversion, configuration, output can export the bat script, the script is used Nconvert.exe here can be bulk conversion folder including subfolders, but not only the specified format (BMP format);
So write a bat yourself.




  
 
  1. @rem 作用:把文件夹下的所有的bmp文件转成jpg格式;nconvert的命令语法是从XnView导出的;
  2. @rem 用法:
  3. @rem 其他:
  4. @rem 2015/12/20 周日 14:34:30.37
  5. @echo off&SetLocal EnableDelayEdexpansion&cd /d "%~dp0"
  6. set "nconvert="D:\programs\Mexe\nconvert.exe""
  7. set "folderbmp=e:\videos\鬼步舞\*.bmp"
  8. set n=0
  9. for /f "eol= delims=" %%a in (‘dir !folderbmp! /b /s ‘) do (
  10. set /a n+=1
  11. !nconvert! -npcd 2 -size 256x256+0 -ctype rgb -corder inter -out jpeg -D "%%a"
  12. )
  13. echo !n! 个bmp文件
  14. pause






From for notes (Wiz)

07. Convert all BMP under folder (including subdirectories) to JPG

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.