diff options
| author | Přemysl Eric Janouch <p@janouch.name> | 2022-06-08 02:45:45 +0200 | 
|---|---|---|
| committer | Přemysl Eric Janouch <p@janouch.name> | 2022-06-08 02:51:55 +0200 | 
| commit | 84f8c9436ffb84ca5d443b906f1ffb7be42a50e2 (patch) | |
| tree | 5b9a614080f5b74806e7d37e7292982f9f401406 /fiv.c | |
| parent | a8f7532abdd9eade6ccc7587968e63eea3b5d159 (diff) | |
| download | fiv-84f8c9436ffb84ca5d443b906f1ffb7be42a50e2.tar.gz fiv-84f8c9436ffb84ca5d443b906f1ffb7be42a50e2.tar.xz fiv-84f8c9436ffb84ca5d443b906f1ffb7be42a50e2.zip  | |
Downscale embedded thumbnails within minions
Otherwise the UI would become unresponsive during loading.
Diffstat (limited to 'fiv.c')
| -rw-r--r-- | fiv.c | 6 | 
1 files changed, 3 insertions, 3 deletions
@@ -1773,9 +1773,9 @@ output_thumbnail(const char *path_arg, gboolean extract, const char *size_arg)  	if (!path_arg)  		exit_fatal("no path given"); -	FivThumbnailSize size = 0; +	FivThumbnailSize size = FIV_THUMBNAIL_SIZE_COUNT;  	if (size_arg) { -		for (; size < FIV_THUMBNAIL_SIZE_COUNT; size++) { +		for (size = 0; size < FIV_THUMBNAIL_SIZE_COUNT; size++) {  			if (!strcmp(  					fiv_thumbnail_sizes[size].thumbnail_spec_name, size_arg))  				break; @@ -1787,7 +1787,7 @@ output_thumbnail(const char *path_arg, gboolean extract, const char *size_arg)  	GError *error = NULL;  	GFile *file = g_file_new_for_commandline_arg(path_arg);  	cairo_surface_t *surface = NULL; -	if (extract && (surface = fiv_thumbnail_extract(file, &error))) +	if (extract && (surface = fiv_thumbnail_extract(file, size, &error)))  		fiv_io_serialize_to_stdout(surface, FIV_IO_SERIALIZE_LOW_QUALITY);  	else if (size_arg &&  		(g_clear_error(&error),  | 
