Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
perl5 /
Image /
ExifTool /
[ HOME SHELL ]
Name
Size
Permission
Action
Charset
[ DIR ]
drwxr-xr-x
Lang
[ DIR ]
drwxr-xr-x
AES.pm
18.66
KB
-rw-r--r--
AFCP.pm
10.38
KB
-rw-r--r--
AIFF.pm
9.59
KB
-rw-r--r--
APE.pm
9.06
KB
-rw-r--r--
APP12.pm
10.44
KB
-rw-r--r--
ASF.pm
30.21
KB
-rw-r--r--
Apple.pm
5.43
KB
-rw-r--r--
Audible.pm
11.52
KB
-rw-r--r--
BMP.pm
10.45
KB
-rw-r--r--
BPG.pm
7.53
KB
-rw-r--r--
BZZ.pm
17.46
KB
-rw-r--r--
BigTIFF.pm
11.27
KB
-rw-r--r--
BuildTagLookup.pm
121.94
KB
-rw-r--r--
CBOR.pm
11.51
KB
-rw-r--r--
Canon.pm
375.39
KB
-rw-r--r--
CanonCustom.pm
84.32
KB
-rw-r--r--
CanonRaw.pm
29.68
KB
-rw-r--r--
CanonVRD.pm
75.2
KB
-rw-r--r--
CaptureOne.pm
7.85
KB
-rw-r--r--
Casio.pm
62.21
KB
-rw-r--r--
Charset.pm
16.01
KB
-rw-r--r--
DICOM.pm
245.09
KB
-rw-r--r--
DJI.pm
6.31
KB
-rw-r--r--
DNG.pm
31.59
KB
-rw-r--r--
DPX.pm
9.51
KB
-rw-r--r--
DV.pm
9.75
KB
-rw-r--r--
DarwinCore.pm
15.43
KB
-rw-r--r--
DjVu.pm
12.46
KB
-rw-r--r--
EXE.pm
50.3
KB
-rw-r--r--
Exif.pm
246.64
KB
-rw-r--r--
FITS.pm
5.73
KB
-rw-r--r--
FLAC.pm
9.89
KB
-rw-r--r--
FLIF.pm
11.65
KB
-rw-r--r--
FLIR.pm
59.45
KB
-rw-r--r--
Fixup.pm
12.43
KB
-rw-r--r--
Flash.pm
27.5
KB
-rw-r--r--
FlashPix.pm
87.44
KB
-rw-r--r--
Font.pm
27.34
KB
-rw-r--r--
FotoStation.pm
7.97
KB
-rw-r--r--
FujiFilm.pm
54.47
KB
-rw-r--r--
GE.pm
2
KB
-rw-r--r--
GIF.pm
21.85
KB
-rw-r--r--
GIMP.pm
8.35
KB
-rw-r--r--
GPS.pm
19.53
KB
-rw-r--r--
GeoTiff.pm
87.51
KB
-rw-r--r--
Geotag.pm
62.87
KB
-rw-r--r--
GoPro.pm
28
KB
-rw-r--r--
H264.pm
39.29
KB
-rw-r--r--
HP.pm
8
KB
-rw-r--r--
HTML.pm
22.1
KB
-rw-r--r--
HtmlDump.pm
32.8
KB
-rw-r--r--
ICC_Profile.pm
45.63
KB
-rw-r--r--
ID3.pm
56.91
KB
-rw-r--r--
IPTC.pm
39.54
KB
-rw-r--r--
ISO.pm
6.81
KB
-rw-r--r--
ITC.pm
6.63
KB
-rw-r--r--
Import.pm
12.83
KB
-rw-r--r--
InDesign.pm
10.4
KB
-rw-r--r--
JPEG.pm
24.3
KB
-rw-r--r--
JPEGDigest.pm
212.38
KB
-rw-r--r--
JSON.pm
6.15
KB
-rw-r--r--
JVC.pm
3.57
KB
-rw-r--r--
Jpeg2000.pm
49.65
KB
-rw-r--r--
Kodak.pm
120.47
KB
-rw-r--r--
KyoceraRaw.pm
4.31
KB
-rw-r--r--
LIF.pm
4.66
KB
-rw-r--r--
LNK.pm
22.02
KB
-rw-r--r--
Leaf.pm
16.34
KB
-rw-r--r--
Lytro.pm
7.56
KB
-rw-r--r--
M2TS.pm
37.11
KB
-rw-r--r--
MIE.pm
102.09
KB
-rw-r--r--
MIEUnits.pod
13.68
KB
-rw-r--r--
MIFF.pm
9.05
KB
-rw-r--r--
MNG.pm
16.22
KB
-rw-r--r--
MOI.pm
4.14
KB
-rw-r--r--
MPC.pm
4.05
KB
-rw-r--r--
MPEG.pm
22.32
KB
-rw-r--r--
MPF.pm
8.94
KB
-rw-r--r--
MRC.pm
18.39
KB
-rw-r--r--
MWG.pm
30.64
KB
-rw-r--r--
MXF.pm
252.65
KB
-rw-r--r--
MacOS.pm
30.7
KB
-rw-r--r--
MakerNotes.pm
68.93
KB
-rw-r--r--
Matroska.pm
34.44
KB
-rw-r--r--
Microsoft.pm
52.13
KB
-rw-r--r--
Minolta.pm
99.93
KB
-rw-r--r--
MinoltaRaw.pm
16.49
KB
-rw-r--r--
Motorola.pm
5.31
KB
-rw-r--r--
Nikon.pm
431.96
KB
-rw-r--r--
NikonCapture.pm
28.13
KB
-rw-r--r--
NikonCustom.pm
290.78
KB
-rw-r--r--
NikonSettings.pm
71.88
KB
-rw-r--r--
Nintendo.pm
3.24
KB
-rw-r--r--
OOXML.pm
13.61
KB
-rw-r--r--
Ogg.pm
8.81
KB
-rw-r--r--
Olympus.pm
139.89
KB
-rw-r--r--
OpenEXR.pm
10.26
KB
-rw-r--r--
Opus.pm
2.22
KB
-rw-r--r--
Other.pm
2.63
KB
-rw-r--r--
PCX.pm
3.72
KB
-rw-r--r--
PDF.pm
90.77
KB
-rw-r--r--
PGF.pm
4.04
KB
-rw-r--r--
PICT.pm
33.2
KB
-rw-r--r--
PLIST.pm
17.07
KB
-rw-r--r--
PLUS.pm
147.71
KB
-rw-r--r--
PNG.pm
60.72
KB
-rw-r--r--
PPM.pm
4.97
KB
-rw-r--r--
PSP.pm
9.02
KB
-rw-r--r--
Palm.pm
11.9
KB
-rw-r--r--
Panasonic.pm
96.62
KB
-rw-r--r--
PanasonicRaw.pm
31.77
KB
-rw-r--r--
Parrot.pm
20.95
KB
-rw-r--r--
Pentax.pm
220.46
KB
-rw-r--r--
PhaseOne.pm
26.24
KB
-rw-r--r--
PhotoCD.pm
18.25
KB
-rw-r--r--
PhotoMechanic.pm
8.09
KB
-rw-r--r--
Photoshop.pm
43.36
KB
-rw-r--r--
PostScript.pm
29.11
KB
-rw-r--r--
PrintIM.pm
3.44
KB
-rw-r--r--
Qualcomm.pm
43.43
KB
-rw-r--r--
QuickTime.pm
409.72
KB
-rw-r--r--
QuickTimeStream.pl
126.03
KB
-rw-r--r--
RIFF.pm
70.97
KB
-rw-r--r--
RSRC.pm
9.58
KB
-rw-r--r--
RTF.pm
13.46
KB
-rw-r--r--
Radiance.pm
4.56
KB
-rw-r--r--
Rawzor.pm
6.17
KB
-rw-r--r--
Real.pm
26.89
KB
-rw-r--r--
Reconyx.pm
14.2
KB
-rw-r--r--
Red.pm
10.82
KB
-rw-r--r--
Ricoh.pm
37.18
KB
-rw-r--r--
Samsung.pm
54.64
KB
-rw-r--r--
Sanyo.pm
11.83
KB
-rw-r--r--
Scalado.pm
3.91
KB
-rw-r--r--
Shift.pl
23.28
KB
-rw-r--r--
Shortcuts.pm
9.81
KB
-rw-r--r--
Sigma.pm
33.16
KB
-rw-r--r--
SigmaRaw.pm
23.45
KB
-rw-r--r--
Sony.pm
439.69
KB
-rw-r--r--
SonyIDC.pm
11.95
KB
-rw-r--r--
Stim.pm
4.53
KB
-rw-r--r--
TagInfoXML.pm
33.14
KB
-rw-r--r--
TagLookup.pm
647.18
KB
-rw-r--r--
TagNames.pod
1.76
MB
-rw-r--r--
Text.pm
8.12
KB
-rw-r--r--
Theora.pm
3.41
KB
-rw-r--r--
Torrent.pm
11.58
KB
-rw-r--r--
Unknown.pm
1.69
KB
-rw-r--r--
VCard.pm
17.31
KB
-rw-r--r--
Validate.pm
29.75
KB
-rw-r--r--
Vorbis.pm
8.13
KB
-rw-r--r--
WTV.pm
12.97
KB
-rw-r--r--
WriteCanonRaw.pl
24.29
KB
-rw-r--r--
WriteExif.pl
130.6
KB
-rw-r--r--
WriteIPTC.pl
29.6
KB
-rw-r--r--
WritePDF.pl
29.02
KB
-rw-r--r--
WritePNG.pl
16.07
KB
-rw-r--r--
WritePhotoshop.pl
10.85
KB
-rw-r--r--
WritePostScript.pl
26.71
KB
-rw-r--r--
WriteQuickTime.pl
89.63
KB
-rw-r--r--
WriteXMP.pl
70.49
KB
-rw-r--r--
Writer.pl
301.76
KB
-rw-r--r--
XMP.pm
176.89
KB
-rw-r--r--
XMP2.pl
81.66
KB
-rw-r--r--
XMPStruct.pl
36.66
KB
-rw-r--r--
ZIP.pm
27.61
KB
-rw-r--r--
ZISRAW.pm
7.85
KB
-rw-r--r--
iWork.pm
7.79
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : NikonCapture.pm
#------------------------------------------------------------------------------ # File: NikonCapture.pm # # Description: Read/write Nikon Capture information # # Revisions: 11/08/2005 - P. Harvey Created # 10/10/2008 - P. Harvey Updated for Capture NX 2 # 16/04/2011 - P. Harvey Decode NikonCaptureEditVersions # # References: 1) http://www.cybercom.net/~dcoffin/dcraw/ # IB) Iliah Borg private communication (LibRaw) #------------------------------------------------------------------------------ package Image::ExifTool::NikonCapture; use strict; use vars qw($VERSION); use Image::ExifTool qw(:DataAccess :Utils); use Image::ExifTool::Exif; $VERSION = '1.14'; sub ProcessNikonCapture($$$); # common print conversions my %offOn = ( 0 => 'Off', 1 => 'On' ); my %noYes = ( 0 => 'No', 1 => 'Yes' ); my %unsharpColor = ( 0 => 'RGB', 1 => 'Red', 2 => 'Green', 3 => 'Blue', 4 => 'Yellow', 5 => 'Magenta', 6 => 'Cyan', ); # Nikon Capture data (ref PH) %Image::ExifTool::NikonCapture::Main = ( PROCESS_PROC => \&ProcessNikonCapture, WRITE_PROC => \&WriteNikonCapture, CHECK_PROC => \&Image::ExifTool::Exif::CheckExif, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, NOTES => q{ This information is written by the Nikon Capture software in tag 0x0e01 of the maker notes of NEF images. }, # 0x007ddc9d contains contrast information 0x008ae85e => { Name => 'LCHEditor', Writable => 'int8u', PrintConv => \%offOn, }, 0x0c89224b => { Name => 'ColorAberrationControl', Writable => 'int8u', PrintConv => \%offOn, }, 0x116fea21 => { Name => 'HighlightData', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::HighlightData', }, }, 0x2175eb78 => { Name => 'D-LightingHQ', Writable => 'int8u', PrintConv => \%offOn, }, 0x2fc08431 => { Name => 'StraightenAngle', Writable => 'double', }, 0x374233e0 => { Name => 'CropData', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::CropData', }, }, 0x39c456ac => { Name => 'PictureCtrl', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::PictureCtrl', }, }, 0x3cfc73c6 => { Name => 'RedEyeData', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::RedEyeData', }, }, 0x3d136244 => { Name => 'EditVersionName', Writable => 'string', # (null terminated) }, # 0x3e726567 added when I rotated by 90 degrees 0x416391c6 => { Name => 'QuickFix', Writable => 'int8u', PrintConv => \%offOn, }, 0x56a54260 => { Name => 'Exposure', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::Exposure', }, }, 0x5f0e7d23 => { Name => 'ColorBooster', Writable => 'int8u', PrintConv => \%offOn, }, 0x6a6e36b6 => { Name => 'D-LightingHQSelected', Writable => 'int8u', PrintConv => \%noYes, }, 0x753dcbc0 => { Name => 'NoiseReduction', Writable => 'int8u', PrintConv => \%offOn, }, 0x76a43200 => { Name => 'UnsharpMask', Writable => 'int8u', PrintConv => \%offOn, }, 0x76a43201 => { Name => 'Curves', Writable => 'int8u', PrintConv => \%offOn, }, 0x76a43202 => { Name => 'ColorBalanceAdj', Writable => 'int8u', PrintConv => \%offOn, }, 0x76a43203 => { Name => 'AdvancedRaw', Writable => 'int8u', PrintConv => \%offOn, }, 0x76a43204 => { Name => 'WhiteBalanceAdj', Writable => 'int8u', PrintConv => \%offOn, }, 0x76a43205 => { Name => 'VignetteControl', Writable => 'int8u', PrintConv => \%offOn, }, 0x76a43206 => { Name => 'FlipHorizontal', Writable => 'int8u', PrintConv => \%noYes, }, 0x76a43207 => { # rotation angle in degrees Name => 'Rotation', Writable => 'int16u', }, 0x083a1a25 => { Name => 'HistogramXML', Writable => 'undef', Binary => 1, AdjustSize => 4, # patch Nikon bug }, 0x84589434 => { Name => 'BrightnessData', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::Brightness', }, }, # 0x88f55e48 - related to QuickFix 0x890ff591 => { Name => 'D-LightingHQData', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::DLightingHQ', }, }, 0x926f13e0 => { Name => 'NoiseReductionData', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::NoiseReduction', }, }, 0x9ef5f6e0 => { Name => 'IPTCData', SubDirectory => { TagTable => 'Image::ExifTool::IPTC::Main', }, }, # 0xa7264a72 - related to QuickFix 0xab5eca5e => { Name => 'PhotoEffects', Writable => 'int8u', PrintConv => \%offOn, }, 0xac6bd5c0 => { Name => 'VignetteControlIntensity', Writable => 'int16s', }, 0xb0384e1e => { Name => 'PhotoEffectsData', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::PhotoEffects', }, }, 0xb999a36f => { Name => 'ColorBoostData', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::ColorBoost', }, }, 0xbf3c6c20 => { Name => 'WBAdjData', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::WBAdjData', }, }, 0xce5554aa => { Name => 'D-LightingHS', Writable => 'int8u', PrintConv => \%offOn, }, 0xe2173c47 => { Name => 'PictureControl', Writable => 'int8u', PrintConv => \%offOn, }, 0xe37b4337 => { Name => 'D-LightingHSData', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::DLightingHS', }, }, 0xe42b5161 => { Name => 'UnsharpData', SubDirectory => { TagTable => 'Image::ExifTool::NikonCapture::UnsharpData', }, }, 0xe9651831 => { Name => 'PhotoEffectHistoryXML', Binary => 1, Writable => 'undef', }, 0xfe28a44f => { Name => 'AutoRedEye', Writable => 'int8u', PrintConv => \%offOn, # (have seen a value of 28 here for older software?) }, 0xfe443a45 => { Name => 'ImageDustOff', Writable => 'int8u', PrintConv => \%offOn, }, ); %Image::ExifTool::NikonCapture::UnsharpData = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int8u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0 => 'UnsharpCount', 19 => { Name => 'Unsharp1Color', Format => 'int16u', PrintConv => \%unsharpColor }, 23 => { Name => 'Unsharp1Intensity', Format => 'int16u' }, 25 => { Name => 'Unsharp1HaloWidth', Format => 'int16u' }, 27 => 'Unsharp1Threshold', 46 => { Name => 'Unsharp2Color', Format => 'int16u', PrintConv => \%unsharpColor }, 50 => { Name => 'Unsharp2Intensity', Format => 'int16u' }, 52 => { Name => 'Unsharp2HaloWidth', Format => 'int16u' }, 54 => 'Unsharp2Threshold', 73 => { Name => 'Unsharp3Color', Format => 'int16u', PrintConv => \%unsharpColor }, 77 => { Name => 'Unsharp3Intensity', Format => 'int16u' }, 79 => { Name => 'Unsharp3HaloWidth', Format => 'int16u' }, 81 => 'Unsharp3Threshold', 100 => { Name => 'Unsharp4Color', Format => 'int16u', PrintConv => \%unsharpColor }, 104 => { Name => 'Unsharp4Intensity', Format => 'int16u' }, 106 => { Name => 'Unsharp4HaloWidth', Format => 'int16u' }, 108 => 'Unsharp4Threshold', # there could be more, but I grow bored of this... :P ); %Image::ExifTool::NikonCapture::DLightingHS = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int32u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0 => 'D-LightingHSAdjustment', 1 => 'D-LightingHSColorBoost', ); %Image::ExifTool::NikonCapture::DLightingHQ = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int32u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0 => 'D-LightingHQShadow', 1 => 'D-LightingHQHighlight', 2 => 'D-LightingHQColorBoost', ); %Image::ExifTool::NikonCapture::ColorBoost = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int8u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0 => { Name => 'ColorBoostType', PrintConv => { 0 => 'Nature', 1 => 'People', }, }, 1 => { Name => 'ColorBoostLevel', Format => 'int32u', }, ); %Image::ExifTool::NikonCapture::WBAdjData = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int8u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0x00 => { Name => 'WBAdjRedBalance', Format => 'double', }, 0x08 => { Name => 'WBAdjBlueBalance', Format => 'double', }, 0x10 => { Name => 'WBAdjMode', PrintConv => { 1 => 'Use Gray Point', 2 => 'Recorded Value', 3 => 'Use Temperature', 4 => 'Calculate Automatically', 5 => 'Auto2', #IB 6 => 'Underwater', #IB 7 => 'Auto1', }, }, 0x14 => { #IB Name => 'WBAdjLighting', Format => 'int16u', PrintHex => 1, PrintConv => { 0x000 => 'None', 0x100 => 'Incandescent', 0x200 => 'Daylight (direct sunlight)', 0x201 => 'Daylight (shade)', 0x202 => 'Daylight (cloudy)', 0x300 => 'Standard Fluorescent (warm white)', 0x301 => 'Standard Fluorescent (3700K)', 0x302 => 'Standard Fluorescent (cool white)', 0x303 => 'Standard Fluorescent (5000K)', 0x304 => 'Standard Fluorescent (daylight)', 0x305 => 'Standard Fluorescent (high temperature mercury vapor)', 0x400 => 'High Color Rendering Fluorescent (warm white)', 0x401 => 'High Color Rendering Fluorescent (3700K)', 0x402 => 'High Color Rendering Fluorescent (cool white)', 0x403 => 'High Color Rendering Fluorescent (5000K)', 0x404 => 'High Color Rendering Fluorescent (daylight)', 0x500 => 'Flash', 0x501 => 'Flash (FL-G1 filter)', 0x502 => 'Flash (FL-G2 filter)', 0x503 => 'Flash (TN-A1 filter)', 0x504 => 'Flash (TN-A2 filter)', 0x600 => 'Sodium Vapor Lamps', # 0x1002 => seen for WBAdjMode modes of Underwater and Calculate Automatically }, }, 0x18 => { Name => 'WBAdjTemperature', Format => 'int16u', }, 0x25 => { Name => 'WBAdjTint', Format => 'int32s', }, ); %Image::ExifTool::NikonCapture::PhotoEffects = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int8u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0 => { Name => 'PhotoEffectsType', PrintConv => { 0 => 'None', 1 => 'B&W', 2 => 'Sepia', 3 => 'Tinted', }, }, 4 => { Name => 'PhotoEffectsRed', Format => 'int16s', }, 6 => { Name => 'PhotoEffectsGreen', Format => 'int16s', }, 8 => { Name => 'PhotoEffectsBlue', Format => 'int16s', }, ); %Image::ExifTool::NikonCapture::Brightness = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int8u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0 => { Name => 'BrightnessAdj', Format => 'double', ValueConv => '$val * 50', ValueConvInv => '$val / 50', }, 8 => { Name => 'EnhanceDarkTones', PrintConv => \%offOn, }, ); %Image::ExifTool::NikonCapture::NoiseReduction = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int8u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0x04 => { Name => 'EdgeNoiseReduction', PrintConv => \%offOn, }, 0x05 => { Name => 'ColorMoireReductionMode', PrintConv => { 0 => 'Off', 1 => 'Low', 2 => 'Medium', 3 => 'High', }, }, 0x09 => { Name => 'NoiseReductionIntensity', Format => 'int32u', }, 0x0d => { Name => 'NoiseReductionSharpness', Format => 'int32u', }, 0x11 => { Name => 'NoiseReductionMethod', Format => 'int16u', PrintConv => { 0 => 'Faster', 1 => 'Better Quality', 2 => 'Better Quality 2013', }, }, 0x15 => { Name => 'ColorMoireReduction', PrintConv => \%offOn, }, 0x17 => { Name => 'NoiseReduction', PrintConv => \%offOn, }, 0x18 => { Name => 'ColorNoiseReductionIntensity', Format => 'int32u', }, 0x1c => { Name => 'ColorNoiseReductionSharpness', Format => 'int32u', }, ); %Image::ExifTool::NikonCapture::CropData = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int8u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0x1e => { Name => 'CropLeft', Format => 'double', ValueConv => '$val / 2', ValueConvInv => '$val * 2', }, 0x26 => { Name => 'CropTop', Format => 'double', ValueConv => '$val / 2', ValueConvInv => '$val * 2', }, 0x2e => { Name => 'CropRight', Format => 'double', ValueConv => '$val / 2', ValueConvInv => '$val * 2', }, 0x36 => { Name => 'CropBottom', Format => 'double', ValueConv => '$val / 2', ValueConvInv => '$val * 2', }, 0x8e => { Name => 'CropOutputWidthInches', Format => 'double', }, 0x96 => { Name => 'CropOutputHeightInches', Format => 'double', }, 0x9e => { Name => 'CropScaledResolution', Format => 'double', }, 0xae => { Name => 'CropSourceResolution', Format => 'double', ValueConv => '$val / 2', ValueConvInv => '$val * 2', }, 0xb6 => { Name => 'CropOutputResolution', Format => 'double', }, 0xbe => { Name => 'CropOutputScale', Format => 'double', }, 0xc6 => { Name => 'CropOutputWidth', Format => 'double', }, 0xce => { Name => 'CropOutputHeight', Format => 'double', }, 0xd6 => { Name => 'CropOutputPixels', Format => 'double', }, ); %Image::ExifTool::NikonCapture::PictureCtrl = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int8u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0x00 => { Name => 'PictureControlActive', PrintConv => \%offOn, }, 0x13 => { Name => 'PictureControlMode', Format => 'string[16]', }, # 0x29 changes with Hue and Sharpening 0x2a => { Name => 'QuickAdjust', ValueConv => '$val - 128', ValueConvInv => '$val + 128', }, 0x2b => { Name => 'SharpeningAdj', ValueConv => '$val ? $val - 128 : "Auto"', ValueConvInv => '$val=~/\d/ ? $val + 128 : 0', }, 0x2c => { Name => 'ContrastAdj', ValueConv => '$val ? $val - 128 : "Auto"', ValueConvInv => '$val=~/\d/ ? $val + 128 : 0', }, 0x2d => { Name => 'BrightnessAdj', ValueConv => '$val ? $val - 128 : "Auto"', # no "Auto" mode (yet) for this setting ValueConvInv => '$val=~/\d/ ? $val + 128 : 0', }, 0x2e => { Name => 'SaturationAdj', ValueConv => '$val ? $val - 128 : "Auto"', ValueConvInv => '$val=~/\d/ ? $val + 128 : 0', }, 0x2f => { Name => 'HueAdj', ValueConv => '$val - 128', ValueConvInv => '$val + 128', }, # 0x37 changed from 0 to 2 when Picture Control is enabled (and no active DLighting) ); %Image::ExifTool::NikonCapture::RedEyeData = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int8u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0 => { Name => 'RedEyeCorrection', PrintConv => { 0 => 'Off', 1 => 'Automatic', 2 => 'Click on Eyes', }, }, ); %Image::ExifTool::NikonCapture::Exposure = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int8u', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0x00 => { Name => 'ExposureAdj', Format => 'int16s', ValueConv => '$val / 100', ValueConvInv => '$val * 100', }, 0x12 => { Name => 'ExposureAdj2', Format => 'double', PrintConv => 'sprintf("%.4f", $val)', PrintConvInv => '$val', }, 0x24 => { Name => 'ActiveD-Lighting', PrintConv => \%offOn, }, 0x25 => { Name => 'ActiveD-LightingMode', PrintConv => { 0 => 'Unchanged', 1 => 'Off', 2 => 'Low', 3 => 'Normal', 4 => 'High', 6 => 'Extra High', 7 => 'Extra High 1', 8 => 'Extra High 2', }, }, ); %Image::ExifTool::NikonCapture::HighlightData = ( PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, WRITE_PROC => \&Image::ExifTool::WriteBinaryData, CHECK_PROC => \&Image::ExifTool::CheckBinaryData, WRITABLE => 1, FORMAT => 'int8s', FIRST_ENTRY => 0, GROUPS => { 0 => 'MakerNotes', 2 => 'Image' }, 0 => 'ShadowProtection', 1 => 'SaturationAdj', 6 => 'HighlightProtection', ); #------------------------------------------------------------------------------ # write Nikon Capture data (ref 1) # Inputs: 0) ExifTool object reference, 1) reference to directory information # 2) pointer to tag table # Returns: 1 on success sub WriteNikonCapture($$$) { my ($et, $dirInfo, $tagTablePtr) = @_; $et or return 1; # allow dummy access to autoload this package # no need to edit this information unless necessary unless ($$et{EDIT_DIRS}{MakerNotes} or $$et{EDIT_DIRS}{IPTC}) { return undef; } my $dataPt = $$dirInfo{DataPt}; my $dirStart = $$dirInfo{DirStart}; my $dirLen = $$dirInfo{DirLen}; if ($dirLen < 22) { $et->Warn('Short Nikon Capture Data',1); return undef; } # make sure the capture data is properly contained SetByteOrder('II'); my $tagID = Get32u($dataPt, $dirStart); # sometimes size includes 18 header bytes, and other times it doesn't (eg. ViewNX 2.1.1) my $size = Get32u($dataPt, $dirStart + 18); my $pad = $dirLen - $size - 18; unless ($tagID == 0x7a86a940 and ($pad >= 0 or $pad == -18)) { $et->Warn('Unrecognized Nikon Capture Data header'); return undef; } # determine if there is any data after this block if ($pad > 0) { $pad = substr($$dataPt, $dirStart + 18 + $size, $pad); $dirLen = $size + 18; } else { $pad = ''; } my $outBuff = ''; my $pos; my $newTags = $et->GetNewTagInfoHash($tagTablePtr); my $dirEnd = $dirStart + $dirLen; # loop through all entries in the Nikon Capture data for ($pos=$dirStart+22; $pos+22<$dirEnd; $pos+=22+$size) { $tagID = Get32u($dataPt, $pos); $size = Get32u($dataPt, $pos + 18) - 4; last if $size < 0 or $pos + 22 + $size > $dirEnd; my $tagInfo = $et->GetTagInfo($tagTablePtr, $tagID); if ($tagInfo) { my $newVal; if ($$tagInfo{SubDirectory}) { # rewrite the subdirectory my %subdirInfo = ( DataPt => $dataPt, DirStart => $pos + 22, DirLen => $size, ); my $subTable = GetTagTable($tagInfo->{SubDirectory}->{TagTable}); # ignore minor errors in IPTC since there is typically trailing garbage my $oldSetting = $et->Options('IgnoreMinorErrors'); $$tagInfo{Name} =~ /IPTC/ and $et->Options(IgnoreMinorErrors => 1); # rewrite the directory $newVal = $et->WriteDirectory(\%subdirInfo, $subTable); # restore our original options $et->Options(IgnoreMinorErrors => $oldSetting); } elsif ($$newTags{$tagID}) { # get new value for this tag if we are writing it my $format = $$tagInfo{Format} || $$tagInfo{Writable}; my $oldVal = ReadValue($dataPt,$pos+22,$format,1,$size); my $nvHash = $et->GetNewValueHash($tagInfo); if ($et->IsOverwriting($nvHash, $oldVal)) { my $val = $et->GetNewValue($tagInfo); $newVal = WriteValue($val, $$tagInfo{Writable}) if defined $val; if (defined $newVal and length $newVal) { ++$$et{CHANGED}; } else { undef $newVal; $et->Warn("Can't delete $$tagInfo{Name}"); } } } if (defined $newVal) { next unless length $newVal; # don't write zero length information # write the new value $outBuff .= substr($$dataPt, $pos, 18); $outBuff .= Set32u(length($newVal) + 4); $outBuff .= $newVal; next; } } # rewrite the existing information $outBuff .= substr($$dataPt, $pos, 22 + $size); } unless ($pos == $dirEnd) { if ($pos == $dirEnd - 4) { # it seems that sometimes (NX2) the main block size is wrong by 4 bytes # (did they forget to include the size word?) $outBuff .= substr($$dataPt, $pos, 4); } else { $et->Warn('Nikon Capture Data improperly terminated',1); return undef; } } # add the header and return the new directory return substr($$dataPt, $dirStart, 18) . Set32u(length($outBuff) + 4) . $outBuff . $pad; } #------------------------------------------------------------------------------ # process Nikon Capture data (ref 1) # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref # Returns: 1 on success sub ProcessNikonCaptureEditVersions($$$) { my ($et, $dirInfo, $tagTablePtr) = @_; my $dataPt = $$dirInfo{DataPt}; my $dirStart = $$dirInfo{DirStart}; my $dirLen = $$dirInfo{DirLen}; my $dirEnd = $dirStart + $dirLen; my $verbose = $et->Options('Verbose'); SetByteOrder('II'); return 0 unless $dirLen > 4; my $num = Get32u($dataPt, $dirStart); my $pos = $dirStart + 4; $verbose and $et->VerboseDir('NikonCaptureEditVersions', $num); while ($num) { last if $pos + 4 > $dirEnd; my $len = Get32u($dataPt, $pos); last if $pos + $len + 4 > $dirEnd; my %dirInfo = ( DirName => 'NikonCapture', Parent => 'NikonCaptureEditVersions', DataPt => $dataPt, DirStart => $pos + 4, DirLen => $len, ); $$et{DOC_NUM} = ++$$et{DOC_COUNT}; $et->ProcessDirectory(\%dirInfo, $tagTablePtr); --$num; $pos += $len + 4; } delete $$et{DOC_NUM}; return 1; } #------------------------------------------------------------------------------ # process Nikon Capture data (ref 1) # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref # Returns: 1 on success sub ProcessNikonCapture($$$) { my ($et, $dirInfo, $tagTablePtr) = @_; my $dataPt = $$dirInfo{DataPt}; my $dirStart = $$dirInfo{DirStart}; my $dirLen = $$dirInfo{DirLen}; my $dirEnd = $dirStart + $dirLen; my $verbose = $et->Options('Verbose'); my $success = 0; SetByteOrder('II'); $verbose and $et->VerboseDir('NikonCapture', 0, $dirLen); my $pos; for ($pos=$dirStart+22; $pos+22<$dirEnd; ) { my $tagID = Get32u($dataPt, $pos); my $size = Get32u($dataPt, $pos + 18) - 4; $pos += 22; last if $size < 0 or $pos + $size > $dirEnd; my $tagInfo = $et->GetTagInfo($tagTablePtr, $tagID); if ($tagInfo or $verbose) { my ($format, $value); # (note that Writable will be 0 for Unknown tags) $tagInfo and $format = ($$tagInfo{Format} || $$tagInfo{Writable}); # generate a reasonable default format type for short values if (not $format and ($size == 1 or $size == 2 or $size == 4)) { $format = 'int' . ($size * 8) . 'u'; } if ($format) { my $count = 1; if ($format eq 'string' or $format eq 'undef') { # patch Nikon bug in size of some values (HistogramXML) $size += $$tagInfo{AdjustSize} if $tagInfo and $$tagInfo{AdjustSize}; $count = $size; } $value = ReadValue($dataPt,$pos,$format,$count,$size); } elsif ($size == 1) { $value = substr($$dataPt, $pos, $size); } $et->HandleTag($tagTablePtr, $tagID, $value, DataPt => $dataPt, DataPos => $$dirInfo{DataPos}, Base => $$dirInfo{Base}, Start => $pos, Size => $size, ) and $success = 1; } $pos += $size; } return $success; } 1; # end __END__ =head1 NAME Image::ExifTool::NikonCapture - Read/write Nikon Capture information =head1 SYNOPSIS This module is loaded automatically by Image::ExifTool when required. =head1 DESCRIPTION This module contains routines to read and write Nikon Capture information in the maker notes of NEF images. =head1 AUTHOR Copyright 2003-2022, Phil Harvey (philharvey66 at gmail.com) This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 REFERENCES =over 4 =item L<http://www.cybercom.net/~dcoffin/dcraw/> =back =head1 SEE ALSO L<Image::ExifTool::TagNames/NikonCapture Tags>, L<Image::ExifTool::TagNames/Nikon Tags>, L<Image::ExifTool(3pm)|Image::ExifTool> =cut
Close