Cannot save picture as Jpeg in Windows

Tim, this is some code that fails (loads and immediately tries to save a jpeg file).

[code] Dim p As Picture
Dim f As new FolderItem(“c:\jpgToConvert.jpg”, FolderItem.PathTypeNative)
If f<>Nil Then
If f.Exists() Then
p = Picture.Open(f)
End If
End If

Dim f2 As New FolderItem(“c:\jpgConverted.jpg”, FolderItem.PathTypeNative)
If f2<>Nil Then
If f2.Exists() Then
End If
If not( f2.SaveAsJPEGMBS(p, 80)) Then
End If
End If[/code]

Do I do something wrong?

Are you trying to put it into c:\? You can’t do that without the right permissions on W8.

are you sure you have write permissions on C:\ ?

Christian, you could only do that on W8 if the program was started with Run As Administrator

why not save to desktop.

dim f2 as folderitem = specialfolders.desktop.child("test.jpg")


Christian you are right. All other apps were run as administrators except the one I was testing this method. When I changed the directory it worked! Thank you very much.