- \ backslash, the next character is literal and not subject to interpretation
- \n newline
- \r carriage return
- < less-than character.
- > greater-than character.
- & ampersand character.
- %% a percent sign
- %b file size of image read in (use -precision 16 to force results in B)
- %c comment meta-data property
- %d directory component of path
- %e filename extension or suffix
- %f filename (including suffix)
- %g layer canvas page geometry (equivalent to "%Wx%H%X%Y")
- %h current image height in pixels
- %i image filename (note: becomes output filename for "info:")
- %k CALCULATED: number of unique colors
- %l label meta-data property
- %m image file format (file magic)
- %n number of images in current image sequence, report once per frame
- %o output filename (used for delegates)
- %p index of image in current image list
- %q quantum depth (compile-time constant)
- %r image class and colorspace
- %s scene number (from input unless re-assigned)
- %t filename without directory or extension (suffix)
- %u unique temporary filename (used for delegates)
- %w current width in pixels
- %x x resolution (density)
- %y y resolution (density)
- %z image depth (as read in unless modified, image save depth)
- %A image transparency channel. Values include Undefined (no transparency channel), Blend, Copy, or Update.
- %B file size of image read in bytes
- %C image compression type
- %D image GIF dispose method
- %G original image size (%wx%h; before any resizes)
- %H page (canvas) height
- %M Magick filename (original file exactly as given, including read mods)
- %N number of images in current image sequence, report once per image sequence
- %O page (canvas) offset ( = %X%Y )
- %P page (canvas) size ( = %Wx%H )
- %Q image compression quality ( 0 = default )
- %S ?? scenes ??
- %T image time delay (in centi-seconds)
- %U image resolution units
- %W page (canvas) width
- %X page (canvas) x offset (including sign)
- %Y page (canvas) y offset (including sign)
- %Z unique filename (used for delegates)
- %@ CALCULATED: trim bounding box (without actually trimming)
- %# CALCULATED: 'signature' hash of image values
- https://imagemagick.org/script/escape.php
复制代码
之前见过buyiyang大佬用exiftool,工具自带参数打印文件名
查了下资料,magick也可以
- @echo off
- rem 批处理保存为utf-8编码格式,自行设置magick变量
- chcp 65001
- for /f "tokens=1-2*" %%a in ('magick identify -format "%%w %%h %%i\n" *.jpg') do (
- echo w=%%a
- echo h=%%b
- echo name=%%c
- )
- pause
复制代码
|