mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-31 14:33:54 -04:00
update GetImageSize
This commit is contained in:
parent
00507972be
commit
4acaeecca4
@ -513,13 +513,16 @@ namespace Emby.Drawing
|
|||||||
/// <returns>ImageSize.</returns>
|
/// <returns>ImageSize.</returns>
|
||||||
private ImageSize GetImageSizeInternal(string path, bool allowSlowMethod)
|
private ImageSize GetImageSizeInternal(string path, bool allowSlowMethod)
|
||||||
{
|
{
|
||||||
// Can't use taglib because it keeps a lock on the file
|
|
||||||
//try
|
//try
|
||||||
//{
|
//{
|
||||||
// using (var file = TagLib.File.Create(new StreamFileAbstraction(Path.GetFileName(path), _fileSystem.OpenRead(path), null)))
|
// using (var fileStream = _fileSystem.OpenRead(path))
|
||||||
|
// {
|
||||||
|
// using (var file = TagLib.File.Create(new StreamFileAbstraction(Path.GetFileName(path), fileStream, null)))
|
||||||
// {
|
// {
|
||||||
// var image = file as TagLib.Image.File;
|
// var image = file as TagLib.Image.File;
|
||||||
|
|
||||||
|
// if (image != null)
|
||||||
|
// {
|
||||||
// var properties = image.Properties;
|
// var properties = image.Properties;
|
||||||
|
|
||||||
// return new ImageSize
|
// return new ImageSize
|
||||||
@ -528,6 +531,8 @@ namespace Emby.Drawing
|
|||||||
// Width = properties.PhotoWidth
|
// Width = properties.PhotoWidth
|
||||||
// };
|
// };
|
||||||
// }
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
//}
|
//}
|
||||||
//catch
|
//catch
|
||||||
//{
|
//{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user