-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.pl
More file actions
41 lines (27 loc) · 737 Bytes
/
test.pl
File metadata and controls
41 lines (27 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
=pod
do {
require MIME::Base64;
{
ThumbnailImage => \MIME::Base64::decode("/9j
=cut
use MIME::Base64;
use Image::ExifTool qw(ImageInfo);
use Data::Dump qw(dump);
my $f=qq(/Users/ste/Desktop/thumb/_A2Y2516.CR2);
my $info = ImageInfo($f, 'thumbnailimage');
#
# dump($info->{'ThumbnailImage'});
#$encoded = encode_base64($info);
#dump($encoded);
# $decoded = decode_base64($info->{'ThumbnailImage'});
# dump($decoded);
open(FH, ">:raw", "test.jpg") or die;
# binmode(FH);
#$d = ${$info->{'ThumbnailImage'}};
print FH ${$info->{'ThumbnailImage'}};
close(FH);
open(FH, ">:raw", "test.jpg.uu") or die;
# binmode(FH);
#$d = ${$info->{'ThumbnailImage'}};
print FH encode_base64(${$info->{'ThumbnailImage'}});
close(FH);