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 : WritePNG.pl
#------------------------------------------------------------------------------ # File: WritePNG.pl # # Description: Write PNG meta information # # Revisions: 09/16/2005 - P. Harvey Created # # References: 1) http://www.libpng.org/pub/png/spec/1.2/ #------------------------------------------------------------------------------ package Image::ExifTool::PNG; use strict; #------------------------------------------------------------------------------ # Calculate CRC or update running CRC (ref 1) # Inputs: 0) data reference, 1) running crc to update (undef initially) # 2) data position (undef for 0), 3) data length (undef for all data), # Returns: updated CRC my @crcTable; sub CalculateCRC($;$$$) { my ($dataPt, $crc, $pos, $len) = @_; $crc = 0 unless defined $crc; $pos = 0 unless defined $pos; $len = length($$dataPt) - $pos unless defined $len; $crc ^= 0xffffffff; # undo 1's complement # build lookup table unless done already unless (@crcTable) { my ($c, $n, $k); for ($n=0; $n<256; ++$n) { for ($k=0, $c=$n; $k<8; ++$k) { $c = ($c & 1) ? 0xedb88320 ^ ($c >> 1) : $c >> 1; } $crcTable[$n] = $c; } } # calculate the CRC foreach (unpack("x${pos}C$len", $$dataPt)) { $crc = $crcTable[($crc^$_) & 0xff] ^ ($crc >> 8); } return $crc ^ 0xffffffff; # return 1's complement } #------------------------------------------------------------------------------ # Encode data in ASCII Hex # Inputs: 0) input data reference # Returns: Hex-encoded data (max 72 chars per line) sub HexEncode($) { my $dataPt = shift; my $len = length($$dataPt); my $hex = ''; my $pos; for ($pos = 0; $pos < $len; $pos += 36) { my $n = $len - $pos; $n > 36 and $n = 36; $hex .= unpack('H*',substr($$dataPt,$pos,$n)) . "\n"; } return $hex; } #------------------------------------------------------------------------------ # Write profile chunk (possibly compressed if Zlib is available) # Inputs: 0) outfile, 1) Raw profile type (SCALAR ref for iCCP name), 2) data ref # 3) profile header type (undef if not a text profile) # Returns: 1 on success sub WriteProfile($$$;$) { my ($outfile, $rawType, $dataPt, $profile) = @_; my ($buff, $prefix, $chunk, $deflate); if ($rawType ne $stdCase{exif} and eval { require Compress::Zlib }) { $deflate = Compress::Zlib::deflateInit(); } if (not defined $profile) { # write ICC profile as compressed iCCP chunk if possible if (ref $rawType) { return 0 unless $deflate; $chunk = 'iCCP'; $prefix = "$$rawType\0\0"; } else { $chunk = $rawType; if ($rawType eq $stdCase{zxif}) { $prefix = "\0" . pack('N', length $$dataPt); # (proposed compressed EXIF) } else { $prefix = ''; # standard EXIF } } if ($deflate) { $buff = $deflate->deflate($$dataPt); return 0 unless defined $buff; $buff .= $deflate->flush(); $dataPt = \$buff; } } else { # write as ASCII-hex encoded profile in tEXt or zTXt chunk my $txtHdr = sprintf("\n$profile profile\n%8d\n", length($$dataPt)); $buff = $txtHdr . HexEncode($dataPt); $chunk = 'tEXt'; # write as tEXt if deflate not available $prefix = "Raw profile type $rawType\0"; $dataPt = \$buff; # write profile as zTXt chunk if possible if ($deflate) { my $buf2 = $deflate->deflate($buff); if (defined $buf2) { $dataPt = \$buf2; $buf2 .= $deflate->flush(); $chunk = 'zTXt'; $prefix .= "\0"; # compression type byte (0=deflate) } } } my $hdr = pack('Na4', length($prefix) + length($$dataPt), $chunk) . $prefix; my $crc = CalculateCRC(\$hdr, undef, 4); $crc = CalculateCRC($dataPt, $crc); return Write($outfile, $hdr, $$dataPt, pack('N',$crc)); } #------------------------------------------------------------------------------ # Add iCCP-related chunks to the PNG image if necessary (must come before PLTE and IDAT) # Inputs: 0) ExifTool object ref, 1) output file or scalar ref # Returns: true on success sub Add_iCCP($$) { my ($et, $outfile) = @_; if ($$et{ADD_DIRS}{ICC_Profile}) { # write new ICC data my $tagTablePtr = Image::ExifTool::GetTagTable('Image::ExifTool::ICC_Profile::Main'); my %dirInfo = ( Parent => 'PNG', DirName => 'ICC_Profile' ); my $buff = $et->WriteDirectory(\%dirInfo, $tagTablePtr); if (defined $buff and length $buff) { my $profileName = $et->GetNewValue($Image::ExifTool::PNG::Main{'iCCP-name'}); $profileName = 'icm' unless defined $profileName; if (WriteProfile($outfile, \$profileName, \$buff)) { $et->VPrint(0, "Created ICC profile with name '${profileName}'\n"); delete $$et{ADD_DIRS}{ICC_Profile}; # don't add it again } } } # must also add sRGB and gAMA before PLTE and IDAT if ($$et{ADD_PNG}) { my ($tag, %addBeforePLTE); foreach $tag (qw(sRGB gAMA)) { next unless $$et{ADD_PNG}{$tag}; $addBeforePLTE{$tag} = $$et{ADD_PNG}{$tag}; delete $$et{ADD_PNG}{$tag}; } if (%addBeforePLTE) { my $save = $$et{ADD_PNG}; $$et{ADD_PNG} = \%addBeforePLTE; AddChunks($et, $outfile); $$et{ADD_PNG} = $save; } } return 1; } #------------------------------------------------------------------------------ # This routine is called after we edit an existing directory # Inputs: 0) ExifTool ref, 1) dir name, 2) output data ref # 3) flag set if location is non-standard (to update, but not create from scratch) # - on return, $$outBuff is set to '' if the directory is to be deleted sub DoneDir($$$;$) { my ($et, $dir, $outBuff, $nonStandard) = @_; my $saveDir = $dir; $dir = 'EXIF' if $dir eq 'IFD0'; # don't add this directory again unless this is in a non-standard location if (not $nonStandard) { delete $$et{ADD_DIRS}{$dir}; delete $$et{ADD_DIRS}{IFD0} if $dir eq 'EXIF'; } elsif ($$et{DEL_GROUP}{$dir} or $$et{DEL_GROUP}{$saveDir}) { $et->VPrint(0," Deleting non-standard $dir\n"); $$outBuff = ''; } } #------------------------------------------------------------------------------ # Generate tEXt, zTXt or iTXt data for writing # Inputs: 0) ExifTool ref, 1) tagID, 2) tagInfo ref, 3) value string, 4) language code # Returns: chunk data (not including 8-byte chunk header) # Notes: Sets ExifTool TextChunkType member to the type of chunk written sub BuildTextChunk($$$$$) { my ($et, $tag, $tagInfo, $val, $lang) = @_; my ($xtra, $compVal, $iTXt, $comp); if ($$tagInfo{SubDirectory}) { if ($$tagInfo{Name} eq 'XMP') { $iTXt = 2; # write as iTXt but flag to avoid encoding # (never compress XMP) } else { $comp = 2; # compress raw profile if possible } } else { # compress if specified $comp = 1 if $et->Options('Compress'); if ($lang) { $iTXt = 1; # write as iTXt if it has a language code $tag =~ s/-$lang$//; # remove language code from tagID } elsif ($$et{OPTIONS}{Charset} ne 'Latin' and $val =~ /[\x80-\xff]/) { $iTXt = 1; # write as iTXt if it contains non-Latin special characters } elsif ($$tagInfo{iTXt}) { $iTXt = 1; # write as iTXt if specified in user-defined tag } } if ($comp) { my $warn; if (eval { require Compress::Zlib }) { my $deflate = Compress::Zlib::deflateInit(); $compVal = $deflate->deflate($val) if $deflate; if (defined $compVal) { $compVal .= $deflate->flush(); # only compress if it actually saves space unless (length($compVal) < length($val)) { undef $compVal; $warn = 'uncompressed data is smaller'; } } else { $warn = 'deflate error'; } } else { $warn = 'Compress::Zlib not available'; } # warn if any user-specified compression fails if ($warn and $comp == 1) { $et->Warn("PNG:$$tagInfo{Name} not compressed ($warn)", 1); } } # decide whether to write as iTXt, zTXt or tEXt if ($iTXt) { $$et{TextChunkType} = 'iTXt'; $xtra = (defined $compVal ? "\x01\0" : "\0\0") . ($lang || '') . "\0\0"; # iTXt is encoded as UTF-8 (but note that XMP is already UTF-8) $val = $et->Encode($val, 'UTF8') if $iTXt == 1; } elsif (defined $compVal) { $$et{TextChunkType} = 'zTXt'; $xtra = "\0"; } else { $$et{TextChunkType} = 'tEXt'; $xtra = ''; } return $tag . "\0" . $xtra . (defined $compVal ? $compVal : $val); } #------------------------------------------------------------------------------ # Add any outstanding new chunks to the PNG image # Inputs: 0) ExifTool object ref, 1) output file or scalar ref # 2-N) dirs to add (empty to add all except EXIF 'IFD0', including PNG tags) # Returns: true on success sub AddChunks($$;@) { my ($et, $outfile, @add) = @_; my ($addTags, $tag, $dir, $err, $tagTablePtr, $specified); if (@add) { $addTags = { }; # don't add any PNG tags $specified = 1; } else { $addTags = $$et{ADD_PNG}; # add all PNG tags... delete $$et{ADD_PNG}; # ...once # add all directories @add = sort keys %{$$et{ADD_DIRS}}; } # write any outstanding PNG tags foreach $tag (sort keys %$addTags) { my $tagInfo = $$addTags{$tag}; next if $$tagInfo{FakeTag}; # (iCCP-name) my $nvHash = $et->GetNewValueHash($tagInfo); # (native PNG information is always preferred, so don't rely on just IsCreating) next unless $$nvHash{IsCreating} or $et->IsOverwriting($nvHash) > 0; my $val = $et->GetNewValue($nvHash); if (defined $val) { next if $$nvHash{EditOnly}; my $data; if ($$tagInfo{Table} eq \%Image::ExifTool::PNG::TextualData) { $data = BuildTextChunk($et, $tag, $tagInfo, $val, $$tagInfo{LangCode}); $data = $$et{TextChunkType} . $data; delete $$et{TextChunkType}; } else { $data = "$tag$val"; } my $hdr = pack('N', length($data) - 4); my $cbuf = pack('N', CalculateCRC(\$data, undef)); Write($outfile, $hdr, $data, $cbuf) or $err = 1; $et->VerboseValue("+ PNG:$$tagInfo{Name}", $val); ++$$et{CHANGED}; } } # create any necessary directories foreach $dir (@add) { next unless $$et{ADD_DIRS}{$dir}; # make sure we want to add it first my $buff; my %dirInfo = ( Parent => 'PNG', DirName => $dir, ); if ($dir eq 'IFD0') { next unless $specified; # wait until specifically asked to write EXIF 'IFD0' my $chunk = $stdCase{exif}; # (zxIf was not adopted) #if ($et->Options('Compress')) { # if (eval { require Compress::Zlib }) { # $chunk = $stdCase{zxif}; # } else { # $et->Warn("Creating uncompressed $stdCase{exif} chunk (Compress::Zlib not available)"); # } #} $et->VPrint(0, "Creating $chunk chunk:\n"); $$et{TIFF_TYPE} = 'APP1'; $tagTablePtr = Image::ExifTool::GetTagTable('Image::ExifTool::Exif::Main'); $buff = $et->WriteDirectory(\%dirInfo, $tagTablePtr, \&Image::ExifTool::WriteTIFF); if (defined $buff and length $buff) { WriteProfile($outfile, $chunk, \$buff) or $err = 1; } } elsif ($dir eq 'XMP') { $et->VPrint(0, "Creating XMP iTXt chunk:\n"); $tagTablePtr = Image::ExifTool::GetTagTable('Image::ExifTool::XMP::Main'); $dirInfo{ReadOnly} = 1; $buff = $et->WriteDirectory(\%dirInfo, $tagTablePtr); if (defined $buff and length $buff and # the packet is read-only (because of CRC) Image::ExifTool::XMP::ValidateXMP(\$buff, 'r')) { # (previously, XMP was created as a non-standard XMP profile chunk) # $buff = $Image::ExifTool::xmpAPP1hdr . $buff; # WriteProfile($outfile, 'APP1', \$buff, 'generic') or $err = 1; # (but now write XMP iTXt chunk according to XMP specification) $buff = "iTXtXML:com.adobe.xmp\0\0\0\0\0" . $buff; my $hdr = pack('N', length($buff) - 4); my $cbuf = pack('N', CalculateCRC(\$buff, undef)); Write($outfile, $hdr, $buff, $cbuf) or $err = 1; } } elsif ($dir eq 'IPTC') { $et->Warn('Creating non-standard IPTC in PNG', 1); $et->VPrint(0, "Creating IPTC profile:\n"); # write new IPTC data (stored in a Photoshop directory) $dirInfo{DirName} = 'Photoshop'; $tagTablePtr = Image::ExifTool::GetTagTable('Image::ExifTool::Photoshop::Main'); $buff = $et->WriteDirectory(\%dirInfo, $tagTablePtr); if (defined $buff and length $buff) { WriteProfile($outfile, 'iptc', \$buff, 'IPTC') or $err = 1; } } elsif ($dir eq 'ICC_Profile') { $et->VPrint(0, "Creating ICC profile:\n"); # write new ICC data (only done if we couldn't create iCCP chunk) $tagTablePtr = Image::ExifTool::GetTagTable('Image::ExifTool::ICC_Profile::Main'); $buff = $et->WriteDirectory(\%dirInfo, $tagTablePtr); if (defined $buff and length $buff) { WriteProfile($outfile, 'icm', \$buff, 'ICC') or $err = 1; $et->Warn('Wrote ICC as a raw profile (no Compress::Zlib)'); } } elsif ($dir eq 'PNG-pHYs') { $et->VPrint(0, "Creating pHYs chunk (default 2834 pixels per meter):\n"); $tagTablePtr = Image::ExifTool::GetTagTable('Image::ExifTool::PNG::PhysicalPixel'); my $blank = "\0\0\x0b\x12\0\0\x0b\x12\x01"; # 2834 pixels per meter (72 dpi) $dirInfo{DataPt} = \$blank; $buff = $et->WriteDirectory(\%dirInfo, $tagTablePtr); if (defined $buff and length $buff) { $buff = 'pHYs' . $buff; # CRC includes chunk name my $hdr = pack('N', length($buff) - 4); my $cbuf = pack('N', CalculateCRC(\$buff, undef)); Write($outfile, $hdr, $buff, $cbuf) or $err = 1; } } else { next; } delete $$et{ADD_DIRS}{$dir}; # don't add again } return not $err; } 1; # end __END__ =head1 NAME Image::ExifTool::WritePNG.pl - Write PNG meta information =head1 SYNOPSIS These routines are autoloaded by Image::ExifTool::PNG. =head1 DESCRIPTION This file contains routines to write PNG metadata. =head1 NOTES Compress::Zlib is required to write compressed text. Existing text tags are always rewritten in their original form (compressed zTXt, uncompressed tEXt or international iTXt), so pre-existing compressed information can only be modified if Compress::Zlib is available. Newly created textual information is written in uncompressed tEXt form by default, or as compressed zTXt if the Compress option is used and Compress::Zlib is available (but only if the resulting compressed data is smaller than the original text, which isn't always the case for short text strings). =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 SEE ALSO L<Image::ExifTool::PNG(3pm)|Image::ExifTool::PNG>, L<Image::ExifTool(3pm)|Image::ExifTool> =cut
Close