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
Ïà¹ØÎĵµ£º
ListµÄÓ÷¨
List°üÀ¨List½Ó¿ÚÒÔ¼°List½Ó¿ÚµÄËùÓÐʵÏÖÀà¡£ÒòΪList½Ó¿ÚʵÏÖÁËCollection½Ó¿Ú£¬ËùÒÔList½Ó¿ÚÓµÓÐCollection½Ó¿ÚÌṩµÄËùÓг£Ó÷½·¨£¬ÓÖÒòΪListÊÇÁбíÀàÐÍ£¬ËùÒÔList½Ó¿Ú»¹ÌṩÁËһЩÊʺÏÓÚ×ÔÉíµÄ³£Ó÷½·¨£¬Èç±í1Ëùʾ¡£
±í1 List½Ó¿Ú¶¨ÒåµÄ³£Ó÷½·¨¼°¹¦ÄÜ
´Ó±í1¿ÉÒÔ¿´³ö£¬List½Ó¿ÚÌṩµÄÊʺÏÓÚ×ÔÉíµÄ ......
Õâ¸öÃÕÌâÖ®ËùÒÔ±»³ÆΪ³¤Õû³ýÊÇÒòΪËüËùÉæ¼°µÄ³ÌÐòÊÇÓйØÁ½¸ölongÐÍÊýÖµÕû³ýµÄ¡£±»³ýÊý±íʾµÄÊÇÒ»ÌìÀïµÄ΢ÃëÊý£»¶ø³ýÊý±íʾµÄÊÇÒ»ÌìÀïµÄºÁÃëÊý¡£Õâ¸ö³ÌÐò»á´òÓ¡³öʲôÄØ£¿
public class LongDivision{
public static void main(String args[]){
final long MICROS_PER_DAY = 24 * 60 * 60 * 1000 * 1000;
final lo ......
Java ClassLoader (1) – What is a ClassLoader?
Java ClassLoader (2) – Write your own ClassLoader
Java ClassLoader (3) – Namespaces
Java ClassLoader (4) – Loading a custom ClassLoader on JVM start ......
´ð°¸Òþ²ØÁË£¬Ctrl+AÏÔʾ¡£½¨ÒéÏÈ˼¿¼Ò»Ï½á¹û£¬È»ºóÔËÐдúÂëÊÔÑé¡£Ò²ÐíÄã»á»ÐÈ»´óÎò¡£
1¡¢ÕÒÆæÊý£º
view plaincopy to clipboardprint?
public static boolean isOdd(int i){
return i % 2 == 1;
}
public static boolean isOdd(int i){
return i % 2 == 1;
}
ÉÏÃæµÄ·½·¨ÕæµÄÄÜÕÒµ ......
1¡¢´´½¨ÁËÒ»¸ö¶ÔÏóºó£º £¨1£©Ã»ÓÐÔÚÊʵ±µÄµØ·½Êͷŵô £¨2£©ÔÚÓ¦¸ÃÊͷŵĵط½Ã»ÓÐ×öÊͷŲÙ×÷ ÀýÈ磺ÏÂÃæÒ»¶Î³ÌÐò£º m_progressDlg = ProgressDialog.show(this, getString(R.string.market),getString(R.string.is_visiting), true);
new Thread() {
public void run() {
......