Commit e5dce5cf authored by Felix Paul Kühne's avatar Felix Paul Kühne

MLFile: expand API to save thumbnails which still need scaling

parent 48bd2067
......@@ -81,6 +81,7 @@ extern NSString *kMLFileTypeAudio;
@property (nonatomic, strong) MLAlbumTrack *albumTrack;
@property (nonatomic, strong) NSString *thumbnailName;
- (void)setComputedThumbnailScaledForDevice:(UIImage *)thumbnail;
@property (nonatomic, strong) UIImage *computedThumbnail;
@property (nonatomic, assign) BOOL isSafe;
@property (nonatomic, assign) BOOL isBeingParsed;
......
......@@ -7,6 +7,8 @@ Added Public APIs:
objectForURIRepresentation:
migrateLibraryToBasePath
deviceSpeedCategory
- MLFile:
- new selectors: setComputedThumbnailScaledForDevice
Version 2.5
-----------
......
......@@ -295,6 +295,12 @@ NSString *kMLFileTypeAudio = @"audio";
return nil;
}
- (void)setComputedThumbnailScaledForDevice:(UIImage *)thumbnail
{
[self setComputedThumbnail:[UIImage scaleImage:thumbnail
toFitRect:(CGRect){CGPointZero, [UIImage preferredThumbnailSizeForDevice]}]];
}
- (void)setComputedThumbnail:(UIImage *)image
{
NSURL *url = [NSURL fileURLWithPath:[self thumbnailPath]];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment