"/" (Unix) or
Setting Thumbnail size = 0 turns off the thumbnail
creation.
+
+ Thumbnail options = <options>
+ With this option one can pass additional parameters to the ImageMagick
+ package. They are passes 1:1 to the convert program. Commonly
+ used is the -density option to increase the image quality when
+ converting from PDF or EPS files.
+
diff --git a/src/elogd.c b/src/elogd.c
index db8c7850..0d0ff208 100755
--- a/src/elogd.c
+++ b/src/elogd.c
@@ -23046,7 +23046,7 @@ int is_inline_attachment(char *encoding, int message_id, char *text, int i, char
int create_thumbnail(LOGBOOK * lbs, char *file_name)
{
- char str[2 * MAX_PATH_LENGTH], cmd[2 * MAX_PATH_LENGTH], thumb_size[256];
+ char str[2 * MAX_PATH_LENGTH], cmd[2 * MAX_PATH_LENGTH], thumb_size[256], thumb_options[256];
int i;
if (!image_magick_exist)
@@ -23059,6 +23059,8 @@ int create_thumbnail(LOGBOOK * lbs, char *file_name)
} else
thumb_size[0] = 0;
+ getcfg(lbs->name, "Thumbnail options", thumb_options, sizeof(thumb_options));
+
if (!chkext(file_name, ".ps") && !chkext(file_name, ".pdf") && !chkext(file_name, ".eps")
&& !chkext(file_name, ".gif") && !chkext(file_name, ".jpg") && !chkext(file_name, ".jpeg")
&& !chkext(file_name, ".png") && !chkext(file_name, ".ico") && !chkext(file_name, ".tif"))
@@ -23079,9 +23081,9 @@ int create_thumbnail(LOGBOOK * lbs, char *file_name)
strlcat(str, ".png", sizeof(str));
if (chkext(file_name, ".pdf") || chkext(file_name, ".ps"))
- snprintf(cmd, sizeof(cmd), "convert '%s[0-7]'%s '%s'", file_name, thumb_size, str);
+ snprintf(cmd, sizeof(cmd), "convert %s '%s[0-7]'%s '%s'", thumb_options, file_name, thumb_size, str);
else
- snprintf(cmd, sizeof(cmd), "convert '%s'%s '%s'", file_name, thumb_size, str);
+ snprintf(cmd, sizeof(cmd), "convert %s '%s'%s '%s'", thumb_options, file_name, thumb_size, str);
#ifdef OS_WINNT
for (i = 0; i < (int) strlen(cmd); i++)