savePropertiesAsync does not work with PNG files?


  • Setting the System.Author and System.Comment file properties on a PNG fails with "invalid argument".

    Is this really not supported in the API?

    Thursday, June 26, 2014 12:46 AM

All replies

  • Hi pkursawe,

    I'm not quite sure, but as I can see from the png file properties (right click the png select properties, Details), I cannot see the PNG has the same Author or Comment properties like JPG.

    Ref:http://www.w3.org/TR/PNG/ I'm afraid PNG does not support such properties.


    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, June 26, 2014 10:10 AM
  • James. I've added tEXT information to PNGs in the past using the WIC API.

    Please see: http://www.w3.org/TR/PNG/#11keywords

    There are some keywords/properties supported and you could even create your own, meaning feeding in things from the Windows Property system.

    Question is: Why is the new, fresh, all better WinRT API more limited than the old WIC (that could add such informations to PNGs even on Windows CE 6!)

    Also, the Property Sheet for file details has so limited edit functionality. When you have a JPG without comment, title etc you cannot add one through this property sheet. If you have comment or title you can change them. I don't want to even imagine how that code looks like underneath ;)

    Thursday, June 26, 2014 12:03 PM
  • Hello,

    Unfortunately at this time we do not support writing to the file stream for certain files types including PNG. We only support a small subset of properties that can be written to the header of the PNG file. Because of this you can't write System.Author or System.Comment properties to PNG files. In all actuality we don't support writing the System.Auhor via Save "Documen tProperties Async" as this is considered a read only property by the subsystem. 



    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Friday, July 04, 2014 12:22 AM
  • But it is know to MS that PNG has been supporting meta info from the beginning? I will write my own WinRT component using WIC (if possible) or libpng then.

    I can write the System.Author property just fine using bitmapProperties at the moment. There should be no such constrains in the API, really.

    Friday, July 04, 2014 12:27 AM