ImageMagick for java ʹÓÃJmagick´¦Àí¸ßÖÊÁ¿Í¼Æ¬
ÔÚ×öpdfÎĵµ×ª³ÉjpgµÄʱºò£¬·¢ÏÖÁËJmagickµÄ´´½¨¸ßÖÊÁ¿µÄͼƬµÄÒ»¸öjavaÀà¿â,×Ô¼ºÒÔǰʹÓÃÁíÍâµÄÒ»¸öÀà¿â,¸Ð¾õÕâ¸ö¸üºÃµã,¾ÍÊÔ×ÅÓÃÁËÏÂ,¸Ð¾õ²»´í
1.ʹÓõÄwindowsϵÄjmagick-win-6.3.9-Q16.zip µØÖ·ÊÇ£ºhttp://downloads.jmagick.org/6.3.9/
2.doc¶ÔÓ¦µÄapiµØÖ·£ºhttp://downloads.jmagick.org/jmagick-doc/
3.°²×°ImageMagick,¹Ù·½ÍøÕ¾£ºhttp://www.imagemagick.org/
ÎÒʹÓõÄÊÇ£ºImageMagick-6.4.6-4-Q16-windows-dll.exe £ºµã»÷ÏÂÔØ
4. °²×°ImageMagick-6.4.6-4-Q16-windows-dll.exe,½« °²×°Ä¿Â¼ÏÂ(°´×Ô¼ºËù°²×°µÄĿ¼ÕÒ) ϵÄËùÓÐdllÎļþ copy µ½ÏµÍ³ÅÌÏ嵀 “C:\WINDOWS\system32\”Îļþ¼ÐÀï
5. ÅäÖû·¾³±äÁ¿
ÔÙ»·¾³±äÁ¿pathÀïÌí¼ÓеÄÖµ “C:\Program Files\ImageMagick-6.4.6-4-Q16“ʹÓÃIDE¿ÉÒÔ²»ÓÃÅäÖÃ
6.½âѹjmagick-win-6.3.9-Q16.zip
½« jmagick.dll ¸´ÖƵ½ÏµÍ³ÅÌÏ嵀 “C:\WINDOWS\system32\”Îļþ¼ÐÀï ºÍ ¸´ÖƵ½jdkµÄbin(Àý“D:\jdk6\bin”)ÎļþÀï¸÷Ò»·Ý
½« jmagick.jar ¸´ÖƵ½TomcatϵÄlibÎļþ¼ÐÀï ºÍ ËùʹÓÃÏîÄ¿µÄWEB-INFÏÂlibÎļþÀï ¸÷Ò»·Ý
7.webÓ¦ÓÃÈç¹û²¿Êðµ½tomcatÏ£¬ÄÇô×îºÃÔÚcatalina.batÎļþÖиıäÈçÏÂÉèÖÃ
set JAVA_OPTS=%JAVA_OPTS% -Xms256M -Xmx768M -XX:MaxPermSize=128M – Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager – Djava.util.logging.config.file=”${catalina.base}\conf\logging.properties”
±ÜÃâheapÒç³öµÄÎÊÌ⣬²ÎÊý¿´Äã×Ô¼ºµÄ»úÆ÷¶ø¶¨¡££¨ -Xms256M -Xmx768M -XX:MaxPermSize=128M £©
8.»¹Òª×¢ÒâÈç¹û²¿Êðµ½webÓ¦Óã¬ÄãÔÚʹÓõÄclassÀïÃæÐèÒª
System.setProperty(“jmagick.systemclassloader”,”no”);
Òª²»È»»á±¨³öUnsatisfiedLinkError: no JMagick in java.library.path.
ʵÀý²âÊÔcode£º
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.utils;
import magick.ImageInfo;
import magick.MagickApiException;
import magick.MagickException;
import magick.MagickImage;
public class Treamspdf {
public static void main(String[] args) {
resetsize("E:/mylearn/workspace/TTPDF/src/com/utils/http_imgload.jpg","new.jpg");
}
public static void resetsize(String
Ïà¹ØÎĵµ£º
Ôڳɹ¦ÊµÏÖJavaµ÷ÓÃC++Ö®ºó£¬½ÓÏÂÀ´Ïëµ½ÄÜ·ñͨ¹ýJNAʵÏÖJavaµ÷ÓÃFortran£¬½ñÌìÊÔÑéÁËһϣ¬»¹ÊDZȽÏÈÝÒ׵ġ£
ÍøÉÏÓÐÒ»¸öJavaµ÷ÓÃF95µÄÀý×Ó£¬µ«ÊÇÎÒ¿¼ÂDz»½öҪʵÏÖF95µÄµ÷Ó㬻¹ÒªÊµÏÖF77µÄµ÷Óã¬ËùÒÔ·ÑÁËһЩÖÜÕÛ¡£
ÎÊÌâµÄ¹Ø¼üÔÚÓÚF77Ϊ¹ý³ÌÃû×Ô¶¯Ìí¼ÓÁËÒ»¸öβ²¿µÄÏ»®Ïߣ¬ËùÒÔsub1Õâ¸ö¹ý³Ì£¬µ½JavaÒ»¶Ë£¬¾Í±ä³ÉÁËsub1_£¬ ......
import java.io.File;
public class FileTest{
public static void main(String[] args){
scan("c:/file/ss");
}
public static void scan(String path){
if(path ==null)
return ;
File file = new File(path); //É ......
Ç뿼ÂÇÏÂÃæÕâ¶Î»°ËùÃèÊöµÄÎÊÌ⣺
TomÔÚÒ»¼ÒÆû³µÅä¼þÉ̵깺ÂòÁËÒ»¸ö¼ÛÖµ$1.10µÄ»ð»¨Èû£¬µ«ÊÇËûÇ®°üÖж¼ÊÇÁ½ÃÀÔªÒ»Õŵij®Æ±¡£Èç¹ûËûÓÃÒ»ÕÅÁ½ÃÀÔªµÄ³®Æ±Ö§¸¶Õâ¸ö»ð»¨Èû£¬ÄÇôӦ¸ÃÕÒ¸øËû¶àÉÙÁãÇ®ÄØ£¿
ÏÂÃæÊÇÒ»¸öÊÔͼ½â¾öÉÏÊöÎÊÌâµÄ³ÌÐò£¬Ëü»á´òÓ¡³öʲôÄØ£¿
public class Change{
public static void main(String args[ ......
http://wsc830719.javaeye.com/blog/523873
http://topic.csdn.net/u/20100406/01/e8fa95e2-417d-4706-98a0-2288970697f2.html
http://javafoot.blog.hexun.com/3905915_d.html
http://wiki.apache.org/tapestry/HowToSetupEclipseWtp
ÔÚEclipseÏ°²×°Tomcat²å¼þ
http://hi.baidu.com/tianlan133/blog/item/ad4c2699ea ......