Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Geting/seting properties on files.

Geting/seting properties on files.

Scheduled Pinned Locked Moved C#
questioncomadobe
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mattias Olgerfelt
    wrote on last edited by
    #1

    Does anyone know how I can get (and eventually set) the properties of a file. I have some pictures take with a digital camera. In all the pictures properties (attributes?) are set for lot o things. E.g. Widht, Height, Bit Depth, Flash Mode, Focal Length, etc... I guess that the attributes are dynamic. But how can I read them using the Framework? I have not been able to find the attributes using a FileInfo-object. I have seen someone doing this on the net using a COM-object with prog-id "DSOLEFILE.PropertyReader". Do I have to use this in stead? And in that case where can I find it? :wtf: X| :sigh::doh: Thanks in advance, Mattias

    J 1 Reply Last reply
    0
    • M Mattias Olgerfelt

      Does anyone know how I can get (and eventually set) the properties of a file. I have some pictures take with a digital camera. In all the pictures properties (attributes?) are set for lot o things. E.g. Widht, Height, Bit Depth, Flash Mode, Focal Length, etc... I guess that the attributes are dynamic. But how can I read them using the Framework? I have not been able to find the attributes using a FileInfo-object. I have seen someone doing this on the net using a COM-object with prog-id "DSOLEFILE.PropertyReader". Do I have to use this in stead? And in that case where can I find it? :wtf: X| :sigh::doh: Thanks in advance, Mattias

      J Offline
      J Offline
      J Dunlap
      wrote on last edited by
      #2

      What you're talking about is metadata, such as Exif image file attributes, which have nothing to do with normal attributes. Use the PropertyItems[] property of the Image class for this.

      "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
      "You must be the change you wish to see in the world." - Mahatma Gandhi

      M 1 Reply Last reply
      0
      • J J Dunlap

        What you're talking about is metadata, such as Exif image file attributes, which have nothing to do with normal attributes. Use the PropertyItems[] property of the Image class for this.

        "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
        "You must be the change you wish to see in the world." - Mahatma Gandhi

        M Offline
        M Offline
        Mattias Olgerfelt
        wrote on last edited by
        #3

        Tanks a lot. :rolleyes: (Even though it was not a trivail thing to get the metadata from the EXIF-file) But what is not wasy, is fun! :cool: /Mattias

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups