c# - How can I read file properties/metadata? -


I should look at the system file properties as shown in the image below, especially title and Copyright Properties How can I do this?

** Read the yellow details ** Normally you System.Diagnostics ,

   

Then check the file description and LegalCopyright properties. Although the case is different for images, you need to explicitly remove bitmap metadata. Think, using

  (stream fs = file. Open ("path \ to \ file", FileMode.Open, FileAccess.ReadWrite)) {bitmapcodecoder decoder = bitmapdicoder. Composition (FS, Bitmapcreate Option None, BitmapUp Default); Bitmapframe frame = decoder Frame [0]; // First frame with metadata bitmap metadata metadata = frame. Metadata as bitmap metadata; Check if (metadata! = Null) // // metadata Title, metadata Copyright) fs.Close (); }   

You can find all the properties listed in the documentation on MSDN.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -