(listof (cons/c any/c (listof (cons/c symbol? any/c))))
(struct mediafile (path type identity size mtime props) #:extra-constructor-name make-mediafile #:transparent) path : path? type : mediafile-type? identity : any/c size : any/c mtime : any/c props : mediafile-props?
This package currently supports a few different MIME content-types, listed in the following subsections, along with lists of references that were used in the implementation for each content-type.
ITU CCITT T.81, Terminal Equipment and Protocols for Telematic Services - Information Technology - Digital Compression and Coding of Continuous-Tone Still Images - Requirements and Guidelines, 1992-09
Davis Burren, EXIF MakerNote of Canon, Revision 1.15, 2001-06-03
Evan Hunter, Canon Makernote information, viewed 2012-11-17
Canon MakerNote Tags defined in Exiv2, viewed 2012-11-17
GVsoft Exif MakerNote information, viewed 2012-11-23
Vorbis I specification, 2012-02-03
→ mediafile? path : path-string? canonicalize-path? : boolean? = #true old-mediafile : (or/c #f mediafile?) = #f type-mandatory? : boolean? = #false props-mandatory? : boolean? = #false exception? : boolean? = #true
→ immutable-hash? start-path-or-paths : (or/c path-string? (list-of path-string?)) canonicalize-paths? : boolean? = #true type-mandatory? : boolean? = #false props-mandatory? : boolean? = #false old-hash : immutable-hash? = #f remove-other-paths? : boolean? = #true
This package contains some files that are used for test data.
"exif-org/" – JPEG/Exif and other files, from http://exif.org/samples.html, courtesy of John Hawkins.
- "public-domain/" – Files known to be in the legal public domain, for testing with a breadth of file creators (e.g., different camera models) and situations (e.g., different Ogg container layouts).
"jpeg/" – JPEG/Exif and JPEG/JFIF files from public domain, especially verbatim as saved by particular camera models.
Set camera to capture the image in a relatively small file size. This means setting camera to low resolution, high compression, low quality, etc. (The small size is to make including files with the package more practical.)
- Choose a photographic subject (e.g., stop sign, cloud, thumbtack, light switch) that:
Does not contain any trademarks or copyrighted material (no brand names, logos, book pages, etc.).
Does not contain anything personally-identifiable, such as faces.
Is G-rated. (No showing off Racket programmer abs.)
Is not too complicated, so should compress well.
Take photo with camera.
Do not edit the photo in any way at all – it must be byte-for-byte identical to how the camera first wrote it to your memory card.
Email the file to: firstname.lastname@example.org
In the text of the email, please state “This file is in the public domain.” Note that you are legally giving up all copyright to the image, to make including the file in a regression test suite more practical.
Assemble a suite of test input files, without legal encumbrances. Preferrably small enough file sizes to include in PLaneT package, as part of built-in unit tests.
Needs more real-world testing with diversity of files.
Malformed or insufficiently supported TIFF and Exif files can result in infinite loops or use excessive resources.
Support for additional Exif MakerNotes, especially Nikon ones.
A little bit more support for Canon Exif MakerNotes is possible, such as decoding Custom Functions.
Add support for getting info about multiple streams in Ogg files.
Support additional file types, especially JPEG/JFIF, PNG, and the multiple MP3 ID3 variants.
Add feature to map properties of different formats to common ontology.
Make a variation on scan-mediafiles with a fold interface, such as for various ways of getting incremental results, including if the scanning is in concurrent thread or process.
- Version 2:1 —
- Version 2:0 —
Moving from PLaneT to new package system.
Fixed test cases in "mediafile-exif.rkt". Old change, perhaps unreleased.
- Version 1:0 —
Initial version, for alpha testing and soliciting additional test files. Some subsequent releases are likely to have backward-incompatible changes, such as changes to types of properties.
Copyright 2012, 2016 Neil Van Dyke. This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See http://www.gnu.org/licenses/ for details. For other licenses and consulting, please contact the author. Test files from exif.org (used with permission) and/or that are in the public domain might also be included with this software, and no copyright on them is claimed on those test files by the author of this software.