Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Image::MetaData::JPEG 0.153

    Download button

    No screenshots available
    Downloads: 369  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Stefano Bettelli | More programs
    GPL / FREE
    July 13th, 2006, 17:17 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Image::MetaData::JPEG description

    A Perl extension for showing/modifying JPEG (meta)data

    Image::MetaData::JPEG is a Perl extension for showing/modifying JPEG (meta)data.

    SYNOPSIS

    use Image::MetaData::JPEG;

    # Create a new JPEG file structure object
    my $image = new Image::MetaData::JPEG('somepicture.jpg');
    die 'Error: ' . Image::MetaData::JPEG::Error() unless $image;

    # Get a list of references to comment segments
    my @segments = $image->get_segments('COM', 'INDEXES');

    # Get the JPEG picture dimensions
    my ($dim_x, $dim_y) = $image->get_dimensions();

    # Show all JPEG segments and their content
    print $image->get_description();

    # Retrieve a specific value from Exif meta-data
    my $image_data = $image->get_Exif_data('IMAGE_DATA', 'TEXTUAL');
    print $image_data->{DateTimeOriginal}->[0], "n";

    # Modify the DateTime tag for the main image
    $image->set_Exif_data({'DateTime' => '1994:07:23 12:14:51'},
    'IMAGE_DATA', 'ADD');

    # Delete all meta-data segments (please, don't)
    $image->drop_segments('METADATA');

    # Rewrite file to disk after your modifications
    $image->save('new_file_name.jpg');

    # ... and a lot more methods for viewing/modifying meta-data, which
    # are accessed through the $file or $segments[$index] references.


    The purpose of this module is to read/modify/rewrite meta-data segments in JPEG (Joint Photographic Experts Group format) files, which can contain comments, thumbnails, Exif information (photographic parameters), IPTC information (editorial parameters) and similar data.

    Each JPEG file is made of consecutive segments (tagged data blocks), and the actual row picture data. Most of these segments specify parameters for decoding the picture data into a bitmap; some of them, namely the COMment and APPlication segments, contain instead meta-data, i.e., information about how the photo was shot (usually added by a digital camera) and additional notes from the photograph. These additional pieces of information are especially valuable for picture databases, since the meta-data can be saved together with the picture without resorting to additional database structures. See the appendix about the structure of JPEG files for technical details.

    This module works by breaking a JPEG file into individual segments. Each file is associated to an Image::MetaData::JPEG structure object, which contains one Image::MetaData::JPEG::Segment object for each segment. Segments with a known format are then parsed, and their content can be accessed in a structured way for display. Some of them can even be modified and then rewritten to disk.

    $JPEG::show_warnings

    This package variable must be used to inhibit the printing of warnings: if it is false, warnings are silently ignored. Otherwise, warning messages come with a detailed back-trace and description of the warning location.

    $Image::MetaData::JPEG::show_warnings = undef;

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    MetaData JPEG | Image MetaData | Perl module | module | Image | MetaData

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM