本文整理汇总了Java中org.im4java.process.ProcessStarter类的典型用法代码示例。如果您正苦于以下问题:Java ProcessStarter类的具体用法?Java ProcessStarter怎么用?Java ProcessStarter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProcessStarter类属于org.im4java.process包,在下文中一共展示了ProcessStarter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: AttachmentProvider
import org.im4java.process.ProcessStarter; //导入依赖的package包/类
/**
* Initializate attachments and thumbnailer
*
* @param savePath main folder
* @param IMpath
* @throws Error
*/
public AttachmentProvider(final String savePath, final String IMpath) throws Error {
ProcessStarter.setGlobalSearchPath(IMpath);
attachmentDir = new File(savePath);
attachmentDir.mkdir();
List<Group> boards = StorageManager.groups.getAll();
for (Group g : boards){
File grDir = new File(attachmentDir, g.getName());
grDir.mkdir();
File gi = new File(grDir, Atype.img.toString());
gi.mkdir();
File gt = new File(grDir, Atype.thm.toString());
gt.mkdir();
if (! gi.exists() || ! gt.exists())
throw new Error("Attachment directory "+grDir.getAbsolutePath()+"does not exist");
}
}
开发者ID:Anoncheg1,项目名称:dibd,代码行数:27,代码来源:AttachmentProvider.java
示例2: setGloblePath
import org.im4java.process.ProcessStarter; //导入依赖的package包/类
@Before
public void setGloblePath() {
String osName = System.getProperty("os.name").toLowerCase();
if (osName.indexOf("win") >= 0) { // linux下不要设置此值,不然会报错
ProcessStarter.setGlobalSearchPath(GLOBLE_PATH);
}
}
开发者ID:lklong,项目名称:imageweb,代码行数:13,代码来源:ImageUtilTest.java
示例3: imageMagickPath
import org.im4java.process.ProcessStarter; //导入依赖的package包/类
/**
* This method should be invoked first of all before using
* {@link ImgMagickUtils}.
*
* It just tells the Im4Java wrapper where ImageMagick is installed on disk.
*
* @param path
* The absolute path pointing to the root installation dir of
* ImageMagick. E.g. "C:\Development\ImageMagick". If it is null,
* it does not exist, or it is not a directory, nothing happens
* but the path is not set, and this tool will start throwing
* errors.
*/
public static void imageMagickPath(String path) {
FileHandle dir = new FileHandle(path);
if (path == null || !dir.exists() || !dir.isDirectory()) {
System.err
.println("[ImgMagickUtils] "
+ path
+ " is not a valid installation path for ImageMagick. ImgMagickUtils will not work properly. Exceptions may be thrown.");
return;
}
ProcessStarter.setGlobalSearchPath(path);
}
开发者ID:e-ucm,项目名称:ead,代码行数:25,代码来源:ImgMagickUtils.java
注:本文中的org.im4java.process.ProcessStarter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论