×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Jan 2014
    Posts
    145

    How to save png to media library?

    Here is the code which is not working for me..

    Code:
                var bmp = new WriteableBitmap(OriginalImage, null);
                var img = bmp.ToImage();
                var encoder = new PngEncoder();
                using (var library = new MediaLibrary())
                using (var stream = new MemoryStream())
                {
                    encoder.Encode(img, stream);
                    library.SavePicture("clipr" + DateTime.Now.Ticks, stream);
                }

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    475

    Re: How to save png to media library?

    Normally it's not possible. It will be converted in jpg....
    Windows 8, Windows phone 8 or Nokia Asha developer? Go to DVLUP

  3. #3
    Regular Contributor
    Join Date
    Jan 2014
    Posts
    145

    Re: How to save png to media library?

    I can save png to isolated storage..
    Is it possible to move png file from isolated storage to medialibrary?

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    475

    Re: How to save png to media library?

    Quote Originally Posted by venu238 View Post
    I can save png to isolated storage..
    Is it possible to move png file from isolated storage to medialibrary?
    Unfortunately no.
    It's pretty strange for me. I don't understand this restriction
    Windows 8, Windows phone 8 or Nokia Asha developer? Go to DVLUP

  5. #5
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    475

    Re: How to save png to media library?

    Quote Originally Posted by venu238 View Post
    I can save png to isolated storage..
    Is it possible to move png file from isolated storage to medialibrary?
    Unfortunately no.
    It's pretty strange for me. I don't understand this restriction
    Windows 8, Windows phone 8 or Nokia Asha developer? Go to DVLUP

  6. #6
    Regular Contributor
    Join Date
    Jan 2014
    Posts
    145

    Re: How to save png to media library?

    Okay, Thanks for the information

  7. #7
    Regular Contributor
    Join Date
    Jan 2014
    Posts
    145

    Re: How to save png to media library?

    I'm saving the png images to the isolated storage, so I want to get back all of the images and show them (like our media library/photo hub)..

    Is there any sample to do so? It will ease my work

  8. #8
    Regular Contributor
    Join Date
    Jan 2014
    Posts
    145

    Re: How to save png to media library?

    I got the sample!!

    Here is the sample code
    http://code.msdn.microsoft.com/wpapp...one-8-fd7a1093

Similar Threads

  1. XMPP/Media Library for windows phone 8
    By vinayppatil in forum Windows Phone General
    Replies: 5
    Last Post: 2014-02-12, 07:14
  2. Can you save a picture to a custom folder in the media library?
    By Rob.Kachmar in forum Windows Phone Imaging
    Replies: 1
    Last Post: 2013-11-27, 02:53
  3. Discover media default save location
    By amex in forum Mobile Java General
    Replies: 4
    Last Post: 2007-04-24, 09:23
  4. External Media Library
    By desijatt in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2006-09-27, 00:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×