1Palm::ZirePhoto(3) User Contributed Perl Documentation Palm::ZirePhoto(3)
2
3
4
6 Palm::ZirePhoto - Handler for Palm Zire71 Photo thumbnail database
7
9 This document describes version 1.400 of Palm::ZirePhoto, released
10 March 14, 2015 as part of Palm version 1.400.
11
13 use Palm::ZirePhoto;
14
16 The Zire71 PDB handler is a helper class for the Palm::PDB package. It
17 parses Zire71 Photo thumbnail databases (and, hopefully, Tungsten Photo
18 databases). Actual photos are separate databases and must be processed
19 separately.
20
21 This database is currently only capable of reading.
22
23 AppInfo block
24 The AppInfo block begins with standard category support. See
25 Palm::StdAppInfo for details.
26
27 Records
28 Records may contain no data fields. This occurs when the record has
29 been marked deleted on the Palm, presumably in order to save space
30 (Photo has no provision for archiving when deleting and the separate
31 database storage for the actual images would make it pointless
32 anyways).
33
34 $record = $pdb->{records}[N]
35
36 $record->{'width'}
37 $record->{'height'}
38 $record->{'size'}
39
40 The actual JPEG images dimensions and (compressed) file size.
41
42 $record->{'thumb'}
43
44 The thumbnail is a very small (max size approx 84x84) JPEG format
45 image.
46
47 $record->{'name'}
48
49 Image name. Appending ".jpg" to this will give the database name of the
50 actual image data.
51
52 $record->{'time1'}
53 $record->{'time2'}
54
55 Unix epoch time of when the image was last modified ("time1") and when
56 it was created ("time2").
57
58 Photo Databases
59 Actual photos are stored in separate databases. Each record is preceded
60 by an 8 byte header that describes it a) as a data block (DBLK) and b)
61 the size of the block. Records are generally 4k, except for the last.
62 To convert a Photo database to a JPEG image, one would do something
63 like:
64
65 use Palm::Raw;
66
67 my $pdb = new Palm::PDB;
68 $pdb->Load( "image.jpg.pdb" );
69 open F, ">image.jpg";
70 for( @{ $pdb->{records} } ) {
71 print F substr($_->{'data'}, 8);
72 }
73 close F;
74
75 Notes are stored at the end of the JPEG image. Use "ParseNote" to get
76 it.
77
79 Handling Palm photos can be a bit complicated. Some helper methods are
80 exported to make some special cases a bit easier.
81
82 ParseNote
83 my $photo = read_jpeg_file( "image.jpg" );
84 my $note = Palm::ZirePhoto::ParseNote($photo);
85 print "Note: $note" if defined $note;
86
87 The Palm photo application stores user notes at the end of the JPEG
88 file itself. This method will extract that note and return it. "undef"
89 is returned if the note is unavailable.
90
91 ParseAlbum
92 my $album = slurp("/DCIM/Unfiled/Album.db");
93 my @records = Palm::ZirePhoto::ParseAlbum( $album );
94 print $_->{name},"\n" for( @records );
95
96 Photos on memory cards are stored in subdirectories of "/DCIM". The
97 meta-data for these images are stored in "Album.db" files under each
98 category directory. This method will parse out the meta-data into an
99 array of records similar to those returned by "ParseRecord". Thumbnail
100 information, however, is not available.
101
103 Palm::PDB
104
105 Palm::StdAppInfo
106
108 Palm::ZirePhoto requires no configuration files or environment
109 variables.
110
112 None reported.
113
115 No bugs have been reported.
116
118 Alessandro Zummo "<a.zummo AT towertech.it>"
119
120 Currently maintained by Christopher J. Madsen "<perl AT cjmweb.net>"
121
122 Please report any bugs or feature requests to
123 "<bug-Palm AT rt.cpan.org>" or through the web interface at
124 <http://rt.cpan.org/Public/Bug/Report.html?Queue=Palm>.
125
126 You can follow or contribute to p5-Palm's development at
127 <https://github.com/madsen/p5-Palm>.
128
130 This software is copyright (c) 2003 by Andrew Arensburger & Alessandro
131 Zummo.
132
133 This is free software; you can redistribute it and/or modify it under
134 the same terms as the Perl 5 programming language system itself.
135
137 BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
138 FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
139 WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
140 PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
141 EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
142 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
143 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
144 YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
145 NECESSARY SERVICING, REPAIR, OR CORRECTION.
146
147 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
148 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
149 REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE
150 TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
151 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
152 SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
153 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
154 FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
155 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
156 DAMAGES.
157
158
159
160perl v5.36.0 2023-01-20 Palm::ZirePhoto(3)