Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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½â»ó1 4³õ¼¶ÎÊÌâ

µÃÀ²£¬Ç°ÃæÄǸöÃÕÌâÊÇÓе㼬ÊÖ£¬µ«ËüÊÇÓйØÕû³ýµÄ£¬Ã¿¸öÈ˶¼ÖªµÀÕû³ýÊǺÜÂé·³µÄ¡£ÄÇôÏÂÃæµÄ³ÌÐòÖ»Éæ¼°¼Ó·¨£¬ËüÓÖ»á´òÓ¡³öʲôÄØ£¿
public class Elementary{
public static void main(String[] args){
System.out.println(12345+5432l);
}
}
´Ó±íÃæÉÏ¿´£¬ÕâÏñÊÇÒ»¸öºÜ¼òµ¥µÄÃÕÌâ——¼òµ¥µ½²»ÐèÒªÖ½ºÍ ......

JavaÃÕÌâ1 6¶àÖØתÐÍ

תÐͱ»ÓÃÀ´½«Ò»¸öÊýÖµ´ÓÒ»ÖÖÀàÐÍת»»µ½ÁíÒ»ÖÖÀàÐÍ¡£ÏÂÃæµÄ³ÌÐòÁ¬ÐøʹÓÃÁËÈý¸öתÐÍ¡£ÄÇôËüµ½µ×»á´òÓ¡³öʲôÄØ£¿
public class Multicast{
public static void main (String[] args){
System.out.println((int)(char)(byte) -1);
}
}
ÎÞÂÛÄãÔõÑù·ÖÎöÕâ¸ö³ÌÐò£¬¶¼»á¸Ðµ½ºÜÃÔ»ó¡£ËüÒÔintÊýÖµ-1¿ªÊ¼£¬È»ºó´ÓintתÐÍÎ ......

JavaÃÕÌâ1 7»¥»»ÄÚÈÝ

ÏÂÃæµÄ³ÌÐòʹÓÃÁ˸´ºÏµÄÒì»ò¸³Öµ²Ù×÷·û£¬ËüËùչʾµÄ¼¼ÊõÊÇÒ»ÖÖ±à³ÌÏ°Ëס£ÄÇôËü»á´òÓ¡³öʲôÄØ£¿
public class CleverSwap{
public static void main(String[] args){
int x = 1984; // (0x7c0)
int y = 2001; // (0x7d1)
x^= y^= x^= y;
System.out.println("x= " + x + "; y= " + y);
}
}
¾ÍÏñÆäÃû³Æ ......

´«ÖDz¥¿ÍJavaÅàѵ JSPÄÚÖöÔÏó¡¢Òì³£´¦ÀíÓëÂÒÂëÎÊÌâ

JSP¾Å´óÄÚÖöÔÏó£º
       1.ÓëServletÓйصÄÒþº¬µÄ¶ÔÏó
          (1)page  page¶ÔÏó¶ÔÓ¦JavaÖеĹؼü×Öthis,Ëü´ú±íµ±Ç°JSPÒ³Ãæ
          (2)config  Config¶ÔÏóʹÓÃWebÈÝÆ ......

javaÖн«ÖÐÎÄת»»Îªunicode±àÂë

jdk/binĿ¼ÏÂnative2ascii.exeÎļþ¿ÉÒÔÖ±½Ó½«ÖÐÎÄת³Éunicode.
cmd½øµ½binĿ¼Ï£¬ÔËÐÐnative2ascii.exe¡£ÊäÈëÖÐÎĻسµºó¾ÍÉú³ÉÁËunicode±àÂë¡£
Ö±½ÓË«»÷ÔËÒ²ÐУ¬ÎÒÔÚCMDÏÂÔËÐÐÖ÷ÒªÊÇΪÁË·½±ã½«×ª»»ºóµÄ±àÂ뿽±´³öÀ´¡£
Àý£º
cmd
cd C:\Java\jdk1.5.0_17
C:\Java\jdk1.5.0_17>native2ascii
Ó¬Âñ²Ø  &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ