A
A
Andrey Amelchenya2014-04-15 16:44:38
Windows phone
Andrey Amelchenya, 2014-04-15 16:44:38

How to save png or gif image in Windows Phone 8 from C# code?

You need to save the image in Windows Phone 8 to the "Saved Pictures" album in gif and png format . When using MediaLibrary().SavePicture , it always saves in jpg format , even when I explicitly substitute the extension.
For example,

new MediaLibrary().SavePicture("name.png", stream);
saves the image name.jpg
How can this problem be solved, and can it be solved at all?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2014-04-15
@r4tz52

SavePicture only works with JPEGs. For working with PNG and GIF look at third party libraries like ImageTools .

G
gaploid, 2014-05-05
@gaploid

In windows phone 8.1 version, you can save files yourself, for example, through the file picker msdn.microsoft.com/en-us/library/windows/apps/xaml...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question