[WIP] apng provider

This commit is contained in:
Paddy Xu
2018-08-28 00:16:25 +03:00
parent ee6bca704d
commit 3bcb48a43c
11 changed files with 163 additions and 103 deletions

View File

@@ -59,13 +59,13 @@ namespace QuickLook.Plugin.ImageViewer
return _metaExif;
}
public MemoryStream GetPngStream()
public MemoryStream GetPngStream(bool thumbnail)
{
var temp = Path.GetTempFileName();
File.Delete(temp);
//
var d = RunInternal($"-quiet -embedded_jpeg -out png -o \"{temp}\" \"{_path}\"", 10000);
var thumb = thumbnail ? "-embedded_jpeg" : "";
var d = RunInternal($"-quiet {thumb} -out tiff -o \"{temp}\" \"{_path}\"", 10000);
var ms = new MemoryStream(File.ReadAllBytes(temp));