forked from lxde/libfm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SF#1058] Change size of large thumbnails to 512.
256*256 appears to be small on hi-res displays.
- Loading branch information
Showing
2 changed files
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* fm-thumbnail-loader.c | ||
* | ||
* Copyright 2010 - 2013 Hong Jen Yee (PCMan) <[email protected]> | ||
* Copyright 2012-2015 Andriy Grytsenko (LStranger) <[email protected]> | ||
* Copyright 2012-2018 Andriy Grytsenko (LStranger) <[email protected]> | ||
* | ||
* This file is a part of the Libfm library. | ||
* | ||
|
@@ -822,7 +822,7 @@ static void generate_thumbnails(ThumbnailTask* task) | |
static GObject* scale_pix(GObject* ori_pix, int size) | ||
{ | ||
GObject* scaled_pix; | ||
/* keep aspect ratio and scale to thumbnail size: 128 or 256 */ | ||
/* keep aspect ratio and scale to thumbnail size: 128 or 512 */ | ||
int width = backend.get_image_width(ori_pix); | ||
int height = backend.get_image_height(ori_pix); | ||
int new_width; | ||
|
@@ -1015,14 +1015,14 @@ static gboolean generate_thumbnails_with_builtin(ThumbnailTask* task) | |
if(task->flags & GENERATE_LARGE) | ||
{ | ||
/* don't create thumbnails for images which are too small */ | ||
if(width <=256 && height <= 256) | ||
if (width <= 512 && height <= 512) | ||
{ | ||
large_pix = (GObject*)g_object_ref(ori_pix); | ||
need_save = FALSE; | ||
} | ||
else | ||
{ | ||
large_pix = scale_pix(ori_pix, 256); | ||
large_pix = scale_pix(ori_pix, 512); | ||
need_save = TRUE; | ||
} | ||
if(rotate_degrees != 0) | ||
|
@@ -1172,7 +1172,7 @@ static void generate_thumbnails_with_thumbnailers(ThumbnailTask* task) | |
} | ||
if((task->flags & GENERATE_LARGE) && !(generated & GENERATE_LARGE)) | ||
{ | ||
if(run_thumbnailer(thumbnailer, task, task->large_path, 256)) | ||
if (run_thumbnailer(thumbnailer, task, task->large_path, 512)) | ||
{ | ||
generated |= GENERATE_LARGE; | ||
large_pix = backend.read_image_from_file(task->large_path); | ||
|