feature: export video to gallery for iOS
This commit is contained in:
@@ -100,19 +100,19 @@ namespace Pixiview.Utils
|
||||
}
|
||||
}
|
||||
|
||||
public static ImageSource LoadUgoiraImage(string zip, string frame)
|
||||
public static string LoadUgoiraImage(string zip, string frame)
|
||||
{
|
||||
var file = Path.Combine(PersonalFolder, ugoiraFolder, zip, frame);
|
||||
if (File.Exists(file))
|
||||
{
|
||||
try
|
||||
{
|
||||
return ImageSource.FromFile(file);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
App.DebugError("load.ugoira", $"failed to load ugoira frame: {zip}/{frame}, error: {ex.Message}");
|
||||
}
|
||||
//try
|
||||
//{
|
||||
return file;
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// App.DebugError("load.ugoira", $"failed to load ugoira frame: {zip}/{frame}, error: {ex.Message}");
|
||||
//}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -138,6 +138,11 @@ namespace Pixiview.Utils
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetUgoiraVideoPath(string url)
|
||||
{
|
||||
return Path.Combine(PersonalFolder, ugoiraFolder, Path.GetFileNameWithoutExtension(url) + ".mp4");
|
||||
}
|
||||
|
||||
private static T ReadObject<T>(string file)
|
||||
{
|
||||
string content = null;
|
||||
@@ -397,6 +402,11 @@ namespace Pixiview.Utils
|
||||
var file = Path.Combine(PersonalFolder, imageFolder, Path.GetFileName(url));
|
||||
return File.Exists(file);
|
||||
}
|
||||
public static bool CheckUgoiraVideo(string url)
|
||||
{
|
||||
var file = Path.Combine(PersonalFolder, ugoiraFolder, Path.GetFileNameWithoutExtension(url) + ".mp4");
|
||||
return File.Exists(file);
|
||||
}
|
||||
|
||||
public static string GetPreviewImagePath(string url)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user