Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Adding properties to a file

by BernieC (Pilgrim)
on Mar 24, 2021 at 13:19 UTC ( [id://11130269]=perlquestion: print w/replies, xml ) Need Help??

BernieC has asked for the wisdom of the Perl Monks concerning the following question:

I've looked at File::Properties and that seems to be able to retrieve properties {I haven't actually tried it yet}. What I'm looking for is something that'll *add* new properties. In particular I have png files that I'd like to be able to add some properties about where the image came from, etc. I didn't see anything along those lines in CPAN. I'd even be able to work with a win10 program that does the job {that I then could system() to}

Replies are listed 'Best First'.
Re: Adding properties to a file
by philipbailey (Curate) on Mar 24, 2021 at 14:12 UTC
    "Properties" is quite a vague term, whose meaning depends on the context. But you've mentioned PNG files, so you presumably mean that you want to modify Exif data. I don't recall doing that from Perl, but there seem to be a number of Exif-related modules around: https://metacpan.org/search?size=20&q=exif. Perhaps somebody here has an opinion on which is best.
      Yes, "properties" is vague - that's just what explorer lumps all of that "extra" data into.

      but I think you've given me the key idea: EXIF. I'll check out the EXIF modules and see if I can figure out what to do'

      Thanks!

Re: Adding properties to a file
by hippo (Bishop) on Mar 24, 2021 at 14:36 UTC
    I have png files that I'd like to be able to add some properties about where the image came from, etc. I didn't see anything along those lines in CPAN.

    Did you see Image::ExifTool? It sounds like that would fulfil your criteria.


    🦛

      It sure does. now to see if I can get it to do what I want, but that's the module I {didn't know I} was looking for.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-20 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found