Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Add a segment in a JPG image with Image::MetaData::JPEG

by neoldschool (Initiate)
on Jun 02, 2015 at 09:59 UTC ( [id://1128734]=note: print w/replies, xml ) Need Help??


in reply to Add a segment in a JPG image with Image::MetaData::JPEG

I think I got it. I thought that the segment records where automatically written in the file, but apparently only the $buffer content is!

This updated code actually write something in the segment, as I get the content of the record and write it to the buffer. So the segments's records are only there to tag/organize the data before write to the buffer ?
#add MP header information in the APP2 segment for the image my $buffer; my $segref = new Image::MetaData::JPEG::Segment('APP2', \$buffer, 'NOP +ARSE'); my $head = "MPF0"; my $recref = $segref->store_record('MP_HEADER', $LONG, \$head, 1); $buffer = $recref->get_value();

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1128734]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-16 16:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found