diff options
author | Damiano Galassi <[email protected]> | 2021-04-13 09:17:52 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2021-04-13 09:17:52 +0200 |
commit | 6fec869301eefc2eb3d938e59f5641e9ac06662b (patch) | |
tree | 9f963e9c8a4848fef0a39682b9ec6b06a4f41f52 /macosx/HBPreviewGenerator.m | |
parent | dc4afd877e52fd66b1ebdb527c7f7c33c74c8cfe (diff) |
MacGui: use new api hb_get_preview3 for previews.
Diffstat (limited to 'macosx/HBPreviewGenerator.m')
-rw-r--r-- | macosx/HBPreviewGenerator.m | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/macosx/HBPreviewGenerator.m b/macosx/HBPreviewGenerator.m index 0e5b2b0e9..91b69177f 100644 --- a/macosx/HBPreviewGenerator.m +++ b/macosx/HBPreviewGenerator.m @@ -79,7 +79,7 @@ * * @param index picture index in title. */ -- (CGImageRef) copyImageAtIndex: (NSUInteger) index shouldCache: (BOOL) cache +- (nullable CGImageRef) copyImageAtIndex: (NSUInteger) index shouldCache: (BOOL) cache { if (index >= self.imagesCount) { @@ -92,13 +92,7 @@ if (!theImage) { - HBFilters *filters = self.job.filters; - BOOL deinterlace = (![filters.deinterlace isEqualToString:@"off"]); - - theImage = (CGImageRef)[self.scanCore copyImageAtIndex:index - forTitle:self.job.title - pictureFrame:self.job.picture - deinterlace:deinterlace]; + theImage = [self.scanCore copyImageAtIndex:index job:self.job]; if (cache && theImage) { // The cost is the number of pixels of the image @@ -188,10 +182,7 @@ if (image == NULL) { - image = (CGImageRef)[self.scanCore copyImageAtIndex:index - forTitle:self.job.title - pictureFrame:self.job.picture - deinterlace:NO]; + image = [self.scanCore copyImageAtIndex:index job:self.job]; CFAutorelease(image); } |