Skip to content
Snippets Groups Projects
Commit 88e4ae4d authored by srosse's avatar srosse
Browse files

OO-204: remove the magick path as it doesn't work

parent acbf6362
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,5 @@ ...@@ -20,7 +20,5 @@
<bean id="imageHelperServiceProvider_java" class="org.olat.core.util.image.spi.ImageHelperImpl" /> <bean id="imageHelperServiceProvider_java" class="org.olat.core.util.image.spi.ImageHelperImpl" />
<bean id="imageHelperServiceProvider_magick" class="org.olat.core.util.image.spi.ImageMagickHelper"> <bean id="imageHelperServiceProvider_magick" class="org.olat.core.util.image.spi.ImageMagickHelper" />
<property name="magickPath" value="${thumbnail.magick.path}"/>
</bean>
</beans> </beans>
...@@ -47,19 +47,9 @@ import org.olat.core.util.vfs.VFSLeaf; ...@@ -47,19 +47,9 @@ import org.olat.core.util.vfs.VFSLeaf;
*/ */
public class ImageMagickHelper extends BasicManager implements ImageHelperSPI { public class ImageMagickHelper extends BasicManager implements ImageHelperSPI {
private String magickPath;
public ImageMagickHelper() { public ImageMagickHelper() {
// //
} }
/**
* [used by Spring]
* @param magickPath
*/
public void setMagickPath(String magickPath) {
this.magickPath = magickPath;
}
@Override @Override
public Size thumbnailPDF(VFSLeaf pdfFile, VFSLeaf thumbnailFile, int maxWidth, int maxHeight) { public Size thumbnailPDF(VFSLeaf pdfFile, VFSLeaf thumbnailFile, int maxWidth, int maxHeight) {
...@@ -258,9 +248,7 @@ public class ImageMagickHelper extends BasicManager implements ImageHelperSPI { ...@@ -258,9 +248,7 @@ public class ImageMagickHelper extends BasicManager implements ImageHelperSPI {
} }
ProcessBuilder builder = new ProcessBuilder(cmd); ProcessBuilder builder = new ProcessBuilder(cmd);
builder.environment().put("PATH", magickPath);
process = builder.start(); process = builder.start();
size = executeProcess(thumbnailFile, process); size = executeProcess(thumbnailFile, process);
doneSignal.countDown(); doneSignal.countDown();
} catch (IOException e) { } catch (IOException e) {
......
...@@ -313,11 +313,9 @@ webdav.links.enabled=true ...@@ -313,11 +313,9 @@ webdav.links.enabled=true
######################################################################## ########################################################################
thumbnail.provider=java thumbnail.provider=java
# java is a pure java implementation (which use PDFBox too), magick use ImageMagick and # java is a pure java implementation (which use PDFBox too), magick use ImageMagick and
# GhostScript # GhostScript. For the magick one, you must add the path to convert and gs command line
# in your PATH environnment variable.
thumbnail.provider.values=java,magick thumbnail.provider.values=java,magick
thumbnail.magick.path=/usr/local/bin/
# path to ImageMagick and GhostScript executable ("convert") and GhostScript executable ("gs")
thumbnail.provider.values=/usr/local/bin/
######################################################################## ########################################################################
# Shared resources - used only to generate sample configurations # Shared resources - used only to generate sample configurations
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment