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 /
Info /
[ HOME SHELL ]
Name
Size
Permission
Action
SVG
[ DIR ]
drwxr-xr-x
BMP.pm
5.56
KB
-rw-r--r--
GIF.pm
6.31
KB
-rw-r--r--
ICO.pm
1.59
KB
-rw-r--r--
JPEG.pm
8.91
KB
-rw-r--r--
PNG.pm
4.98
KB
-rw-r--r--
PPM.pm
2.64
KB
-rw-r--r--
SVG.pm
4.04
KB
-rw-r--r--
TIFF.pm
6.87
KB
-rw-r--r--
WBMP.pm
2.59
KB
-rw-r--r--
WEBP.pm
5.89
KB
-rw-r--r--
XBM.pm
2.71
KB
-rw-r--r--
XPM.pm
6.02
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : PPM.pm
package Image::Info::PPM; # Copyright 2000, Gisle Aas. # # This library is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. =begin register MAGIC: /^P[1-6]/ =item PBM/PGM/PPM All information available is extracted. =end register =cut use strict; use vars qw/$VERSION/; $VERSION = 0.04; sub process_file { my($info, $fh) = @_; my @header; my $type; my $num_wanted = 3; my $binary; my $read_header; local($/, $_) = ("\n"); while (<$fh>) { if (s/#\s*(.*)//) { $info->push_info(0, "Comment", $1); } push(@header, split(' ')); if (!$type && @header) { $type = shift(@header); $type =~ s/^P// || die; $binary++ if $type > 3; $type = "p" . qw/p b g/[$type % 3] . "m"; $num_wanted = 2 if $type eq "pbm"; } for (@header) { unless (/^\d+$/) { die "Badly formatted $type file"; } $_ += 0; # strip leading zeroes } next unless @header >= $num_wanted; # Now we know everything there is to know... $read_header = 1; $info->push_info(0, "file_media_type" => "image/$type"); $info->push_info(0, "file_ext" => "$type"); $info->push_info(0, "width", shift @header); $info->push_info(0, "height", shift @header); $info->push_info(0, "resolution", "1/1"); if ($type eq "ppm") { my $MSV = shift @header; $info->push_info(0, "MaxSampleValue", $MSV); $info->push_info(0, "color_type", "RGB"); $info->push_info(0, "SamplesPerPixel", 3); if ($binary) { for (1..3) { $info->push_info(0, "BitsPerSample", int(log($MSV + 1) / log(2) ) ); } } } else { $info->push_info(0, "color_type", "Gray"); $info->push_info(0, "SamplesPerPixel", 1); $info->push_info(0, "BitsPerSample", ($type eq "pbm") ? 1 : 8) if $binary; $info->push_info(0, "MaxSampleValue", shift @header) if $type ne 'pbm'; } last; } if (!$read_header) { $info->push_info(0, 'error' => 'Incomplete PBM/PGM/PPM header'); } } 1; =pod =head1 NAME Image::Info::PPM - PPM support Image::Info =head1 SYNOPSIS use Image::Info qw(image_info dim); my $info = image_info("image.ppm"); if (my $error = $info->{error}) { die "Can't parse image info: $error\n"; } my($w, $h) = dim($info); =head1 DESCRIPTION This modules adds ppm support to L<Image::Info>. It is loaded and used automatically. =head1 METHODS =head2 process_file() $info->process_file($source, $options); Processes one file and sets the found info fields in the C<$info> object. =head1 AUTHOR Gisle Aas. =head1 LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
Close