@@ -26,7 +26,7 @@ public HashSet<ePictureType> SupportedTypes
2626 public Exception LastException { get ; private set ; } = null ;
2727
2828 /// <summary>
29- /// Retreives the image bounds and resolution for an image
29+ /// Retrieves the image bounds and resolution for an image
3030 /// </summary>
3131 /// <param name="image">The image data</param>
3232 /// <param name="type">Type type of image</param>
@@ -42,7 +42,16 @@ public bool GetImageBounds(MemoryStream image, ePictureType type, out double wid
4242 {
4343 width = 0 ;
4444 height = 0 ;
45- return ImageReader . TryGetImageBounds ( type , image , ref width , ref height , out horizontalResolution , out verticalResolution ) ;
45+ var ret = ImageReader . TryGetImageBounds ( type , image , ref width , ref height , out horizontalResolution , out verticalResolution ) ;
46+ if ( ret == false )
47+ {
48+ var t = ImageReader . GetPictureType ( image , false ) ;
49+ if ( t . HasValue )
50+ {
51+ return ImageReader . TryGetImageBounds ( t . Value , image , ref width , ref height , out horizontalResolution , out verticalResolution ) ;
52+ }
53+ }
54+ return ret ;
4655 }
4756 catch ( Exception ex )
4857 {
@@ -56,7 +65,7 @@ public bool GetImageBounds(MemoryStream image, ePictureType type, out double wid
5665 }
5766
5867 /// <summary>
59- /// Returns if the handler is valid for the enviornment .
68+ /// Returns if the handler is valid for the environment .
6069 /// The generic image handler is valid in all environments, so it will always return true.
6170 /// </summary>
6271 /// <returns></returns>
0 commit comments