• d3_385782
    了解作者
  • 8.3MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-21 01:05
    上传日期
操作系统:winXP 软件下载地址:http://downloads.jmagick.org/ 用的是6.3.9 下载ImageMagick-6.3.9-0-Q8-windows-dll.exe和jmagick-win-6.3.9-Q8.zip 安装ImageMagick-6.3.9-0-Q8-windows-dll.exe,按照网上说法把安装后根目录下的所有.dll文件拷贝到C:\WINDOWS\system32下。不过没拷贝成功。略之不理。 jmagick-win-6.3.9-Q8.zip解压缩。将里面的jmagick.dll拷贝至C:\WINDOWS\system32下最好JAVAHOME/bin下也放一份。 配置环境变量path加入C:\Program Files\ImageMagick-6.3.9-Q8(自己视情况在而变) 将jmagick-win-6.3.9-Q8.zip里jmagick.jar放入自己的工程
Java切图工具.rar
  • Java切图工具
  • 切图_files
  • ads_data
  • imgad.jpeg
    10.1KB
  • application.js
    153.6KB
  • offline.gif
    682B
  • icon_evil.gif
    443B
  • icon_minigender_1.gif
    143B
  • icon_biggrin.gif
    347B
  • rss.png
    534B
  • icon_arrow.gif
    303B
  • rss_google.gif
    701B
  • icon_idea.gif
    280B
  • shCoreCommon.js
    22.9KB
  • icon_confused.gif
    322B
  • icon_eek.gif
    698B
  • icon_redface.gif
    468B
  • orange.css
    751B
  • icon_smile.gif
    322B
  • se_hilite.js
    1.6KB
  • icon_razz.gif
    672B
  • icon_twisted.gif
    453B
  • icon_exclaim.gif
    367B
  • ads.htm
    3.7KB
  • show_ads.js
    32.7KB
  • icon_lol.gif
    450B
  • hotkey.js
    3.5KB
  • icon_sad.gif
    323B
  • SyntaxHighlighter.css
    2KB
  • icon_mad.gif
    320B
  • clipboard_new.swf
    3.7KB
  • icon_surprised.gif
    342B
  • icon_rolleyes.gif
    465B
  • compress.js
    16.6KB
  • icon_cry.gif
    452B
  • user-logo-thumb.gif
    863B
  • icon_wink.gif
    447B
  • blog.css
    28.5KB
  • icon_question.gif
    281B
  • rss_xianguo.jpg
    2.2KB
  • user-logo.gif
    1.9KB
  • icon_cool.gif
    708B
  • test_domain.js
    52B
  • expansion_embed.js
    37.5KB
  • ui.css
    1.1KB
  • ImageMagick-6.3.9-0-Q8-windows-dll.exe
    8.4MB
  • jmagick-win-6.3.9-Q8.zip
    84KB
  • 切图.htm
    42.8KB
内容介绍
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" xml:lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>java jmagick实现图片完美缩放(命令版) - 没啥 - JavaEye技术网站</title> <meta name="description" content="操作系统:winXP 软件下载地址:http://downloads.jmagick.org/ 用的是6.3.9 下载ImageMagick-6.3.9-0-Q8-windows-dll.exe和jmagick-win-6.3.9-Q8.zip 安装ImageMagick-6.3.9-0-Q8-windows-dll.exe,按照网上说法把安装后根目录下的所有.dll文件拷贝到C:\WINDOWS\ ..."> <meta name="keywords" content=" java jmagick实现图片完美缩放(命令版)"> <link rel="shortcut icon" href="http://haoji.javaeye.com/images/favicon.ico" type="image/x-icon"> <link href="http://haoji.javaeye.com/rss" rel="alternate" title="没啥" type="application/rss+xml"> <link href="%E5%88%87%E5%9B%BE_files/blog.css" media="screen" rel="stylesheet" type="text/css"> <link href="%E5%88%87%E5%9B%BE_files/orange.css" media="screen" rel="stylesheet" type="text/css"> <script src="%E5%88%87%E5%9B%BE_files/application.js" type="text/javascript"></script> <link href="%E5%88%87%E5%9B%BE_files/SyntaxHighlighter.css" media="screen" rel="stylesheet" type="text/css"> <script src="%E5%88%87%E5%9B%BE_files/shCoreCommon.js" type="text/javascript"></script> <script src="%E5%88%87%E5%9B%BE_files/hotkey.js" type="text/javascript"></script> <style> div#main {background-color: transparent; border: 0; padding: 0px; width: 740px;} </style> <link href="%E5%88%87%E5%9B%BE_files/ui.css" media="screen" rel="stylesheet" type="text/css"> <script src="%E5%88%87%E5%9B%BE_files/compress.js" type="text/javascript"></script> <style type="text/css">.dp-j .annotation { color: #646464; }.dp-j .number { color: #C00000; }</style></head><body> <div id="header"> <div id="blog_site_nav"> <a href="http://www.javaeye.com/" class="homepage" rel='nofollow' onclick='return false;'>首页</a> <a href="http://www.javaeye.com/news" rel='nofollow' onclick='return false;'>新闻</a> <a href="http://www.javaeye.com/forums" rel='nofollow' onclick='return false;'>论坛</a> <a href="http://www.javaeye.com/ask" rel='nofollow' onclick='return false;'>问答</a> <a href="http://www.javaeye.com/blogs" rel='nofollow' onclick='return false;'>博客</a> <a href="http://www.javaeye.com/job" rel='nofollow' onclick='return false;'>招聘</a> <a href="#" onclick="return false;" id="msna" rel='nofollow' onclick='return false;'><u>更多</u> <small>▼</small></a> <div class="quick_menu" style="display: none;"> <a href="http://www.javaeye.com/wiki" rel='nofollow' onclick='return false;'>专栏</a> <a href="http://www.javaeye.com/articles" rel='nofollow' onclick='return false;'>文摘</a> <a href="http://www.javaeye.com/groups" rel='nofollow' onclick='return false;'>圈子</a> <a href="http://www.javaeye.com/google_search" rel='nofollow' onclick='return false;'>搜索</a> </div> </div> <div id="user_nav"> <a href="http://haoji.javaeye.com/login" class="welcome" title="登录" rel='nofollow' onclick='return false;'>您还未登录 !</a> <a href="http://www.javaeye.com/all" style="color: red;" rel='nofollow' onclick='return false;'>我的应用</a> <a href="http://haoji.javaeye.com/login" rel='nofollow' onclick='return false;'>登录</a> <a href="http://haoji.javaeye.com/signup" class="nobg" rel='nofollow' onclick='return false;'>注册</a> </div> </div> <div id="page"> <div id="branding" class="clearfix"> <div id="blog_name"><h1><a href="http://haoji.javaeye.com/" rel='nofollow' onclick='return false;'>没啥</a></h1></div> <div id="blog_preview"> </div> <div id="blog_domain">永久域名 <a href="http://haoji.javaeye.com/" rel='nofollow' onclick='return false;'>http://haoji.javaeye.com</a></div> </div> <div id="content" class="clearfix"> <div id="main"> <div class="blog_main"> <div class="blog_nav"> <div class="pre_next"> <a href="http://haoji.javaeye.com/blog/231011" class="pre" title="kaptcha一个很好用的验证码组件 " rel='nofollow' onclick='return false;'>kaptcha一个很好用的验证码组件 </a> </div> </div> <div class="blog_title"> <div class="date"><span class="year">2008</span><span class="sep_year">-</span><span class="month">11</span><span class="sep_month">-</span><span class="day">18</span></div> <h3><a href="http://haoji.javaeye.com/blog/269505" rel='nofollow' onclick='return false;'><span class="hilite1">java</span> <span class="hilite2">jmagick</span>实现图片完美缩放(命令版)</a></h3> </div> <div class="blog_content"> 操作系统:winXP <br>软件下载地址:http://downloads.<span class="hilite2">jmagick</span>.org/ <br>用的是6.3.9 <br>下载ImageMagick-6.3.9-0-Q8-windows-dll.exe和<span class="hilite2">jmagick</span>-win-6.3.9-Q8.zip <br>安装ImageMagick-6.3.9-0-Q8-windows-dll.exe,按照网上说法把安装后根目录下的所有.dll文件拷贝到C:\WINDOWS\system32下。不过没拷贝成功。略之不理。 <br><span class="hilite2">jmagick</span>-win-6.3.9-Q8.zip解压缩。将里面的<span class="hilite2">jmagick</span>.dll拷贝至C:\WINDOWS\system32下最好JAVAHOME/bin下也放一份。 <br>配置环境变量path加入C:\Program Files\ImageMagick-6.3.9-Q8(自己视情况在而变) <br>将<span class="hilite2">jmagick</span>-win-6.3.9-Q8.zip里<span class="hilite2">jmagick</span>.jar放入自己的工程 <br>这里用的是<span class="hilite1">java</span>调用命令操作。 <br>程序例子代码: <br><div class="dp-highlighter"><div class="bar"><div class="tools"><span class="hilite1">Java</span>代码 <embed src="%E5%88%87%E5%9B%BE_files/clipboard_new.swf" flashvars="clipboard=import%20java.io.File%3B%0Aimport%20java.io.IOException%3B%0Aimport%20java.util.ArrayList%3B%0A%0Apublic%20class%20Aa%20%7B%0A%09public%20static%20String%20CONVERT_PROG%20%3D%20%22C%3A%5C%5CProgram%20Files%5C%5CImageMagick-6.3.9-Q8%5C%5Cconvert.exe%22%3B%2F%2F%E8%A7%86%E6%83%85%E5%86%B5%E8%80%8C%E5%8F%98%0A%09%09%0A%09public%20static%20void%20main(String%5B%5D%20args)%20%7B%0A%09%09File%20in%20%3D%20new%20File(%22C%3A%5C%5C1.gif%22)%3B%2F%2F%E6%BA%90%E6%96%87%E4%BB%B6%0A%09%09File%20out%20%3D%20new%20File(%22C%3A%5C%5C2.gif%22)%3B%2F%2F%E8%BE%93%E5%87%BA%E6%96%87%E4%BB%B6%0A%09%09convert(in%2Cout%2C300%2C100%2C100%2C10)%3B%0A%09%7D%0A%09%0A%0A%09%2F*%0A%09%20*%20Uses%20a%20Runtime.exec()to%20use%20imagemagick%20to%20perform%20the%20given%20conversion%0A%09%20*%20operation.%20Returns%20true%20on%20success%2C%20false%20on%20failure.%20Does%20not%20check%20if%0A%09%20*%20either%20file%20exists.%0A%09%20*%20%0A%09%20*%20%40param%20in%20Description%20of%20the%20Parameter%20%40param%20out%20Description%20of%20the%0A%09%20*%20Parameter%20%40param%20newSize%20Description%20of%20the%20Parameter%20%40param%20quality%0A%09%20*%20Description%20of%20the%20Parameter%20%40return%20Description%20of%20the%20Return%20Value%0A%09%20*%2F%0A%09%40SuppressWarnings(%22unchecked%22)%0A%09private%20static%20boolean%20convert(File%20in%2C%20File%20out%2C%20int%20width%2C%20int%20height%2C%0A%09%09%09int%20quality%2Cint%20newSize)%20%7B%0A%09%09System.out.println(%22convert(%22%20%2B%20in.getPath()%20%2B%20%22%2C%20%22%20%2B%20out.getPath()%0A%09%09%09%09%2B%20%22%2C%20%22%20%2B%20newSize%20%2B%20%22%2C%20%22%20%2B%20quality)%3B%0A%0A%09%09if%20(quality%20%3C%200%20%7C%7C%20quality%20%3E%20100)%20%7B%0A%09%09%09quality%20%3D%2075%3B%0A%09%09%7D%0A%0A%09%09ArrayList%20command%20%3D%20new%20ArrayList(10)%3B%0A%0A%09%09%2F%2F%20note%3A%20CONVERT_PROG%20is%20a%20class%20variable%20that%20stores%20the%20location%20of%0A%09%09%2F%2F%20ImageMagick's%20convert%20command%0A%09%09%2F%2F%20it%20might%20be%20something%20like%20%22%2Fusr%2Flocal%2Fmagick%2Fbin%2Fconvert%22%20or%0A%09%09%2F%2F%20something%20else%2C%20depending%20on%20where%20you%20installed%20it.%0A%09%09command.add(CONVERT_PROG)%3B%0A%09%09command.add(%22-geometry%22)%3B%0A%09%09command.add(width%20%2B%20%22x%22%20%2B%20height)%3B%0A%09%09command.add(%22-quality%22)%3B%0A%09%09command.add(%22%22%20%2B%20quality)%3B%0A%09%09command.add(in.getAbsolutePath())%3B%0A%09%09command.add(out.getAbsolutePath())%3B%0A%0A%09%09System.out.println(command)%3B%0A%0A%09%09return%20e
评论
    相关推荐