Content plugin WDX for Images for Total Commander
Switch to Russian
Extracts information from BMP, GIF, JPEG, JPEG 2000, PCX, PNG, PSD, TIFF image files:
- Real file format
- Byte order in integers
- Number of images (TIFF), local images or frames (GIF), layers (PSD and TIFF), images plus thumbnails (JPEG)
- Width and height of image in pixels, which used to calculate aspect ratio, diagonal and number of pixels
- Number of samples per pixel (channels in Photoshop)
- Number of bit per sample (bits per channel)
- Image mode: RGB, CMYK, etc.
- Image data compression method: LZW, RLE, etc.
- Horizontal and vertical resolution, which used to calculate document sizes: width, height, aspect ratio, diagonal and square
In Change attributes dialog (TC version 7 and above) plugin allows the setting of picture resolution (not all files).
Version 0.5 for Total Commander (x86 and x64).
Use it at your own responsibility.
Tested with Total Commander 7.04a, 8.01
under WinXP (rus) (requires WinNT 3.5 or Win95 or later).
WARNING: While plugin testing make backup copies of images before setting resolution.
This software is donationware. Free for any using. This program
is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY
and NO SUPPORT. Comments and money may be sent to author.
Installation
- Standard: enter into archive with plugin wdx4i.wdx and
pluginst.inf
using TC for automatic install
- Manual: menu Configuration/Options..., next Plugins / Content plugins (.WDX) / Configure...
Notice. In version 0.2 detect string was changed.
To change it in TC settings reinstall plugin or find it in
wincmd.ini
and delete.
Fields
Notice. All data for image (width, height...) are only for first image in file (page for TIFF etc.).
- iform — name of real format of image file independently of its extension
- badext — “Yes”, if extension is not correspond to format
- order — byte order in integers that require more than one byte: big-endian (Mac), little-endian (PC)
- images — number of images (TIFF), local images or frames (GIF), images plus thumbnails (JPEG). For others — 1
- layers — number of layers in PSD and in 1st image in TIFF. For others — 1
- pixw — width of image in pixels
- pixh — height of image in pixels
- orient — image orientation: Quadrate, Landscape or Portrait
- aspect — aspect ratio (pixw / pixh)
- pixd — diagonal in pixels
- pixels — number of pixels in image (pixw x pixh)
- spp — number of samples per pixel (channels in Photoshop)
- bps — number of bit per sample (bits per channel)
- depth — bit depth (bits per pixel) = spp x bps
- mode — image mode: RGB, CMYK, etc. In RGB-a suffix -a means alpha chanel
- compr — image data compression method: LZW, RLE, etc.
- xres — horizontal resolution
- yres — vertical resolution
For JPEG plugin can extract it from sections
with markers APP0 (JFIF), APP1 (Exif) and APPd (Photoshop) — what come first.
Some files not contains such info (GIF — always).
If there is not resolution data in file, you can use default values (see Settings)
- docw — width of document (pixw / xres)
- doch — height of document (pixh / xres)
- docasp — aspect ratio of document (docw / doch)
- docd — diagonal of document
- square — square of document (docw x doch)
- fres — forced resolution of image (by user choice, does not affect on resolution saved in file) along both axes.
May be used for valuation of image sizes with some arbitrary resolution.
If user changes fres in Change attributes dialog, INI file parameter forced_res will be changed in fact
- fdocw — same as docw for fres
- fdoch — same as doch for fres
- fdocasp — same as docasp for fres
- fdocd — same as docd for fres
- fsquare — same as square for fres
- ininame — plugin's INI-file name location. This info is about plugin, not about image file
Settings
When loading plugin reads settings from content plugins INI-file
(usually contplug.ini
in TC dir), section [wdx4i]
, see also ininame field.
After install it writes default values:
configured=1
— not 0, if plugin is configured
default_res=72.0
— if not 0, use this resolution (in default_res_units
) for files without resolution info
default_res_units=0
— units of measurements (1 — dpi, 2 — dpcm) for files without resolution info, 0 — do not use default resolution
forced_res=300.0
— forced resolution in forced_res_units
forced_res_units=1
— units of measurements for forced resolution (1 — dpi, 2 — dpcm)
exif_resolution=1
— if not 0, extract JPEG resolution info from Exif metadata (APP1)
pshop_resolution=1
— if not 0, extract JPEG resolution info from Photoshop metadata (APPd)
size_decimals=0
— number of digits in fractional part of real numbers (TC 6.52 and above). 0 — use TC behaviour
Yuo can change contplug.ini
using any text editor, e.g. Notepad.
Miscellaneous
JPEG compression abbreviation:
- bDCT-H — baseline Discrete Cosine Transform (DCT) plus Huffman
- xsDCT-H — extended sequential DCT Huffman
- pDCT-H — progressive DCT Huffman
- sl-H — spatial lossless Huffman
- xsDCT-A — extended sequential DCT arithmetic
- pDCT-A — progressive DCT arithmetic
- sl-A — spatial lossless arithmetic
To translate or change default fuild names of plugin add (edit) section for your language in a text file
wdx4i.lng in same dir as plugin is. For example see section
[RUS].
About some units of length:
- Quadrat — Didot unit (from French inch) = 48 punkts = 2/3 Fr. inch = 18.05112 mm.
- Pica (pc) = 1/6 inch = 4.2336 mm.
- Point (pt) = 1/72.27 inch = 0.3515 mm.
- PostScript-point (ps-point) = 1/72 inch = 0.3528 μμ.
- Twip (tw) [TWenty In Point ?] = 1/1440 inch = 0.01764 mm.
Plugin can set resolution only for files that already have such an info
(otherwise it must rewrite whole file) and that can hold it. For example, GIF
can not contain such an info at all and rest formats can hold it and can hold
not. Aside from, JPEG can hold not APP0 marker that Photoshop knows (tested
with version 6) and resolution info stored in Exif metadata that
Photoshop ignores. So for such JPEG after setting resolution plugin will show
new one but Photoshop will use default 72 dpi. Similar situation take place
with PNG.
Plugin page: http://www.totalcmd.net/plugring/wdx4i.html
© Oleg Bondar aka Hobo (hobo-mts at mail pnt ru
).
Change 'at
' to symbol at and 'pnt
' to '.' (point).
Subject of message must contain word 'wdx4i'.
History
0.5 (2013/10/24)
- Practically same as 0.5-beta, small typos fixed.
- Added 'version' value into pluginst.inf (new in TC 8.50 beta 7).
0.5-beta (2013/10/13)
- Added JPEG 2000 support. Please, add string '
|FIND("jP ")
'
('jP' with two spaces) into *_detect
string in section [ContentPlugins]
in your wincmd.ini
. Or simply remove and install plugin again.
- 32-bit version linked dinamically with
msvcrt.dll
.
- For PNG only known chunks allowed.
0.4 (2012/03/23)
- Plugin linked with runtime library statically and don't depend on
msvcrt.dll
.
- Added
x64
version.
0.3a (2009/02/06)
0.3 (2009/02/04)
- Removed field pages.
- Added fields images and layers.
0.2b (2009/02/02)
0.2a (2007/10/07)
- Added field badext.
- Small fixes.
0.2 (2007/10/02)
- Detect string was changed. Contents of file is used instead of extension.
- Added field with name of image file format.
- Now it is possible to get data from JPEG files that contains marker SOI not at beginning of the file.
0.1b (2007/10/01)
- Fixed error causing crash when reading some files saved in Photoshop.
0.1a (2007/09/07)
- Fixed error calculating diagonal and square with measurements other then mm.
0.1 (2007/08/19)
- Fixed error reading BMP file header. Thank to Frank Zheng for bug report.
0.1 beta4 (2007/07/02)
- Added forced resolution fields.
- Added aspect ratio of document sizes field.
- Added field for INI file name.
0.1 beta3 (2007/06/25)
- Added function
ContentSetValue()
for set resolution of image in Change attributes dialog.
- Fixed getting PSD file resolution.
- Changed names of some units of measurement.
0.1 beta2 (2007/05/31)
- Added default resolution for files without resolution info.
- Added aspect ratio field.
- Added units of length: mm (now is default), metre, quadrat, pica, point, PostScript-point, twip.
- Parameter defaultdir in
pluginst.inf
changed to wdx4i.
0.1 beta (2007/05/28)