… | |
… | |
84 | $fh = $ESRV[$count]; |
84 | $fh = $ESRV[$count]; |
85 | |
85 | |
86 | $length = -s "$filename"; |
86 | $length = -s "$filename"; |
87 | if (open(FILE,"$filename")) { |
87 | if (open(FILE,"$filename")) { |
88 | binmode( FILE ); |
88 | binmode( FILE ); |
89 | print $fh "IMAGE $num $length $file.$file1\n"; |
89 | my $path = "$file.$file1"; |
|
|
90 | $path =~ s/.*\///; |
|
|
91 | printf $fh "IMAGE %d %d %s\n", $num, $length, $path; |
90 | print "Error reading file $filename" if (!read(FILE, $buf, $length)); |
92 | print "Error reading file $filename" if (!read(FILE, $buf, $length)); |
91 | $position = tell $fh; |
93 | $position = tell $fh; |
92 | print $fh $buf; |
94 | print $fh $buf; |
93 | close(FILE); |
95 | close(FILE); |
94 | |
96 | |