Implemented 'Thumbnail options'

SVN revision: 2341
This commit is contained in:
Stefan Ritt 2010-11-16 16:09:05 +00:00
parent 1d6723da61
commit 98360c536c
4 changed files with 25 additions and 16 deletions

View File

@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2008 # Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "elog", "elog.vcproj", "{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "elog", "elog.vcxproj", "{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -1,18 +1,14 @@
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2008 # Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "elconv", "elconv.vcproj", "{8D6EBED8-48F3-4719-907E-7BE46A3C0FA4}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "elconv", "elconv.vcxproj", "{8D6EBED8-48F3-4719-907E-7BE46A3C0FA4}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "elog", "elog.vcproj", "{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "elog", "elog.vcxproj", "{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "elogd", "elogd.vcproj", "{CB6EB7FE-CC3D-4548-B8B8-8DDA05916759}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "elogd", "elogd.vcxproj", "{CB6EB7FE-CC3D-4548-B8B8-8DDA05916759}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "locext", "locext.vcproj", "{77ED3530-9382-4830-8513-9729C051A93E}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "locext", "locext.vcxproj", "{77ED3530-9382-4830-8513-9729C051A93E}"
EndProject EndProject
Global Global
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32 Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32 Release|Win32 = Release|Win32
@ -32,4 +28,8 @@ Global
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
EndGlobal EndGlobal

View File

@ -980,6 +980,13 @@ if the file name starts with a <b><code>"/"</code></b> (Unix) or <b><code>
Setting <b><code>Thumbnail size = 0</code></b> turns off the thumbnail Setting <b><code>Thumbnail size = 0</code></b> turns off the thumbnail
creation.<p> creation.<p>
</li> </li>
<li>
<b><code>Thumbnail options = &lt;options&gt;</code></b><br>
With this option one can pass additional parameters to the ImageMagick
package. They are passes 1:1 to the <b>convert</b> program. Commonly
used is the <b>-density</b> option to increase the image quality when
converting from PDF or EPS files.<p>
</li>
</ul><a name="attrib" id="attrib"></a> </ul><a name="attrib" id="attrib"></a>
<hr> <hr>
<div class="section"> <div class="section">

View File

@ -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) 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; int i;
if (!image_magick_exist) if (!image_magick_exist)
@ -23059,6 +23059,8 @@ int create_thumbnail(LOGBOOK * lbs, char *file_name)
} else } else
thumb_size[0] = 0; 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") 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, ".gif") && !chkext(file_name, ".jpg") && !chkext(file_name, ".jpeg")
&& !chkext(file_name, ".png") && !chkext(file_name, ".ico") && !chkext(file_name, ".tif")) && !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)); strlcat(str, ".png", sizeof(str));
if (chkext(file_name, ".pdf") || chkext(file_name, ".ps")) 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 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 #ifdef OS_WINNT
for (i = 0; i < (int) strlen(cmd); i++) for (i = 0; i < (int) strlen(cmd); i++)