- Jul 3, 2012
- 993
- 0
- 0
Just want to open this thread to inform developers in case some of you don't know about it or just starting to develop application.
There is a bug in MediaLibrary.SavePicture function. After executing, MediaLibrary leaves a file in your IsolatedStorage with the name of your picture plus ".jpg" extension.
For example if you save your image like this
You will get file with name "New image_jpg.jpg" in IsolatedStorage. .jpg will be converted to _jpg. It seems developers of WP just trying to fix file name when developer send it as .png or any other extension. Not the elegant way to check actual extension for file, but let it remains on their conscience.
So the best way in this situation is to delete this file to save space on phone. If your application utilizes SavePicture a lot, this could be a problem as your "Other" storage will increase
Another suggestion is give the name for your image with .jpg attached, not "My Picture" but "My Picture.jpg" or when other applications read Media library they receive image name without extension which could be a problem if application later search media library by file name.
Microsoft is aware of this bug, but who knows when they fix it.
There is a bug in MediaLibrary.SavePicture function. After executing, MediaLibrary leaves a file in your IsolatedStorage with the name of your picture plus ".jpg" extension.
For example if you save your image like this
Code:
using (var m=new MediaLibrary())
{
m.SavePicture("New image.jpg",imageStream);
}
So the best way in this situation is to delete this file to save space on phone. If your application utilizes SavePicture a lot, this could be a problem as your "Other" storage will increase

Another suggestion is give the name for your image with .jpg attached, not "My Picture" but "My Picture.jpg" or when other applications read Media library they receive image name without extension which could be a problem if application later search media library by file name.
Microsoft is aware of this bug, but who knows when they fix it.