File tree Expand file tree Collapse file tree
IronSoftware.Drawing/IronSoftware.Drawing.Common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2810,20 +2810,7 @@ private int GetTiffFrameCountFast()
28102810 using var tiff = Tiff . ClientOpen ( "in-memory" , "r" , tiffStream , new TiffStream ( ) ) ;
28112811 if ( tiff == null ) return 1 ; // Default to single frame if can't read
28122812
2813- short frameCount = tiff . NumberOfDirectories ( ) ;
2814-
2815- // Filter out thumbnails like in InternalLoadTiff
2816- short actualFrames = 0 ;
2817- for ( short i = 0 ; i < frameCount ; i ++ )
2818- {
2819- tiff . SetDirectory ( i ) ;
2820- if ( ! IsThumbnail ( tiff ) )
2821- {
2822- actualFrames ++ ;
2823- }
2824- }
2825-
2826- return actualFrames > 0 ? actualFrames : 1 ;
2813+ return tiff . NumberOfDirectories ( ) ;
28272814 }
28282815 catch
28292816 {
@@ -2934,14 +2921,8 @@ private Lazy<IReadOnlyList<Image>> OpenImageToImageSharp(bool preserveOriginalFo
29342921 }
29352922 catch ( Exception e )
29362923 {
2937- try
2938- {
2939- return backup . Invoke ( ) ;
2940- }
2941- catch ( Exception ) {
2942- throw new NotSupportedException (
2924+ throw new NotSupportedException (
29432925 "Image could not be loaded. File format is not supported." , e ) ;
2944- }
29452926 }
29462927 } ) ;
29472928 }
You can’t perform that action at this time.
0 commit comments