File tree 2 files changed +14
-1
lines changed
src/ImageSharp/Metadata/Profiles/Exif
tests/ImageSharp.Tests/Metadata/Profiles/Exif
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,14 @@ public IReadOnlyList<IExifValue> Values
121
121
}
122
122
}
123
123
124
+ /// <summary>
125
+ /// Returns the thumbnail in the EXIF profile when available.
126
+ /// </summary>
127
+ /// <returns>
128
+ /// The <see cref="Image"/>.
129
+ /// </returns>
130
+ public Image CreateThumbnail ( ) => this . CreateThumbnail < Rgba32 > ( ) ;
131
+
124
132
/// <summary>
125
133
/// Returns the thumbnail in the EXIF profile when available.
126
134
/// </summary>
Original file line number Diff line number Diff line change @@ -354,10 +354,15 @@ public void Values()
354
354
355
355
TestProfile ( profile ) ;
356
356
357
- using Image < Rgba32 > thumbnail = profile . CreateThumbnail < Rgba32 > ( ) ;
357
+ using Image thumbnail = profile . CreateThumbnail ( ) ;
358
358
Assert . NotNull ( thumbnail ) ;
359
359
Assert . Equal ( 256 , thumbnail . Width ) ;
360
360
Assert . Equal ( 170 , thumbnail . Height ) ;
361
+
362
+ using Image < Rgba32 > genericThumbnail = profile . CreateThumbnail < Rgba32 > ( ) ;
363
+ Assert . NotNull ( genericThumbnail ) ;
364
+ Assert . Equal ( 256 , genericThumbnail . Width ) ;
365
+ Assert . Equal ( 170 , genericThumbnail . Height ) ;
361
366
}
362
367
363
368
[ Fact ]
You can’t perform that action at this time.
0 commit comments