Changes for page Development-Thumbnailing

Last modified by Pascal Robert on 2010/09/19 10:27

From version 7.1
edited by Pascal Robert
on 2010/09/19 10:27
Change comment: There is no comment for this version
To version 9.1
edited by Pascal Robert
on 2010/09/19 10:27
Change comment: Migrated to Confluence 5.3

Summary

Details

Page properties
Parent
... ... @@ -1,0 +1,1 @@
1 +How-tos
Content
... ... @@ -1,18 +1,18 @@
1 1  == Overview ==
2 2  
3 -Many people have asked how to create thumbnails of images using WebObjects. There is nothing specific to WebObjects about this problem, and there are quite a few options for solving it:
3 +Many people have asked how to create thumbnails of images using WebObjects. There is nothing specific to WebObjects about this problem, and there are quite a few options for solving it:
4 4  
5 5  * On Mac OS X, you can use Runtime.exec(..) and call the commandline program "sips," which uses the ImageIO and CoreImage frameworks
6 -* On Mac OS X, you can use Brendan Duddridge's [[ImageIO JNI Wrapper>>http://wocode.com/cgi-bin/WebObjects/WOCode.woa/wa/ShareCodeItem?itemId=430]]
6 +* On Mac OS X, you can use Brendan Duddridge's [[ImageIO JNI Wrapper>>url:http://wocode.com/cgi-bin/WebObjects/WOCode.woa/wa/ShareCodeItem?itemId=430||shape="rect"]]
7 7  * An all platforms, you can use Java2D with Java's ImageIO and BufferedImage
8 -* On many platforms, you can run [[ImageMagick>>http://imagemagick.org/script/index.php]] and use Runtime.exec to call the commandline "convert"
9 -* On many platforms, you can build and run [[JMagick>>http://www.yeo.id.au/jmagick/]], a Java JNI wrapper around ImageMagick
8 +* On many platforms, you can run [[ImageMagick>>url:http://imagemagick.org/script/index.php||shape="rect"]] and use Runtime.exec to call the commandline "convert"
9 +* On many platforms, you can build and run [[JMagick>>url:http://www.yeo.id.au/jmagick/||shape="rect"]], a Java JNI wrapper around ImageMagick
10 10  
11 11  == ImageMagick ==
12 12  
13 13  A utility class to call ImageMagick binaries as an external process with Runtime.exec, to either discover height/width or resize an image. It has a few default filepaths that correspond to what I need on my systems, you probably want to change them for your system(s).
14 14  
15 -//Anjo Krank: I may be wrong, but I'm pretty sure that this code won't work, at least not reliably. There is no guarantee that the the contents of the supplied arrays are filled before the process exits. I had a lot of null-results when I tried this in Wonder. The only safe way I've seen so far is to actually wait until the stream is truly finished reading before accessing the result. And this can only be done by waiting on a sema. Take a look at ERXRuntimeUtilities for a version that does work.//
15 +//Anjo Krank: I may be wrong, but I'm pretty sure that this code won't work, at least not reliably. There is no guarantee that the the contents of the supplied arrays are filled before the process exits. I had a lot of null-results when I tried this in Wonder. The only safe way I've seen so far is to actually wait until the stream is truly finished reading before accessing the result. And this can only be done by waiting on a sema. Take a look at ERXRuntimeUtilities for a version that does work.//
16 16  
17 17  {{code}}
18 18  
... ... @@ -349,7 +349,7 @@
349 349  
350 350  == JAI example ==
351 351  
352 -An example how to resize an image with Java Advanced Imaging ([[http://java.sun.com/products/java-media/jai/]]). The jar files jai-codec.jar and jac-core.jar are in the NEXT//ROOT/Library/Java/Extensions folder and referenced in the classpath. This example uses logging capability from project wonder.//
352 +An example how to resize an image with Java Advanced Imaging ([[http:~~/~~/java.sun.com/products/java-media/jai/>>url:http://java.sun.com/products/java-media/jai/||shape="rect"]]). The jar files jai-codec.jar and jac-core.jar are in the NEXT_ROOT/Library/Java/Extensions folder and referenced in the classpath. This example uses logging capability from project wonder.
353 353  
354 354  {{code}}
355 355