From 537e9028135772cd22a25bf0b8196ffc4541e6f9 Mon Sep 17 00:00:00 2001 From: Paul Friederichsen Date: Wed, 2 Aug 2023 05:42:41 -0500 Subject: [PATCH] Use FFMPEG for AVIF sequences --- hydrus/core/HydrusFileHandling.py | 2 +- hydrus/core/HydrusImageHandling.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/hydrus/core/HydrusFileHandling.py b/hydrus/core/HydrusFileHandling.py index b1261ade..6924b0c2 100644 --- a/hydrus/core/HydrusFileHandling.py +++ b/hydrus/core/HydrusFileHandling.py @@ -400,7 +400,7 @@ def GetFileInfo( path, mime = None, ok_to_look_for_hydrus_updates = False ): ( width, height ) = HydrusImageHandling.GetPSDResolution( path ) - elif mime in HC.VIDEO: + elif mime in HC.VIDEO or mime == HC.IMAGE_AVIF_SEQUENCE: ( ( width, height ), duration, num_frames, has_audio ) = HydrusVideoHandling.GetFFMPEGVideoProperties( path ) diff --git a/hydrus/core/HydrusImageHandling.py b/hydrus/core/HydrusImageHandling.py index e49cff9d..265b53ae 100644 --- a/hydrus/core/HydrusImageHandling.py +++ b/hydrus/core/HydrusImageHandling.py @@ -1228,8 +1228,6 @@ def RawOpenPILImage( path ) -> PILImage.Image: pil_image = PILImage.open( path ) except Exception as e: - - print(e) raise HydrusExceptions.DamagedOrUnusualFileException( 'Could not load the image--it was likely malformed!' )