aspose.psd是高级psd文件格式操作api,没有任何adobe photoshop依赖项。api允许创建或编辑photoshop文件,并提供更新图层属性,添加水印,执行图形操作或将一种文件格式转换为另一种文件的功能。
aspose.psd for .net支持psd和psb文件格式进行加载和处理,并允许导出为各种光栅图像格式,例如tiff,jpeg,png,gif,bmp等。
总体特性
aspose.psd for .net功能概述。
支持的文件格式
在您的应用程序中加载,创建或编辑photoshop psd和psb文件。当前仅适用于.net和java平台。
平台独立性
用于.net的aspose.psd支持任何从2.0开始的.net框架。
先进的.net psd操纵api功能
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
将psd导出为各种栅格格式
用于.net的aspose.psd提供了将psd文件导出为任何受支持的光栅图像格式的功能,只需几行代码。
// load an existing psd image as imageusing (var psd = aspose.psd.image.load(dir + "template.psd")){ // save result in different raster formats with customized attributes psd.save(dir + "output.png", new aspose.psd.imageoptions.pngoptions()); psd.save(dir + "output.jpg", new aspose.psd.imageoptions.jpegoptions() { quality = 70 }); psd.save(dir + "output.tiff", new aspose.psd.imageoptions.tiffoptions(aspose.psd.fileformats.tiff.enums.tiffexpectedformat.tiffccitrle));}复制代码
访问和操纵psd层
用于.net的aspose.psd可让您访问psd的图层,并可以在其中绘制图像或文本。您可以合并图层,更新图层上的文本,设置效果或将图层导出为图像。您也可以使用psd .net api来检测扁平化的psd文件或创建缩略图。
读取或创建psd文件
用于.net的aspose.psd不仅支持加载psd和psb文件格式以进行操作和转换,而且还提供了从头开始创建psd和psb文件的功能。.net开发人员可以使用api自动化可能会帮助他们解决问题的方案。
using (var psd = aspose.psd.image.create(new aspose.psd.imageoptions.psdoptions(){ source = new aspose.psd.sources.filecreatesource(dir + "output.psd", false), colormode = aspose.psd.fileformats.psd.colormodes.rgb, compressionmethod = aspose.psd.fileformats.psd.compressionmethod.rle, version = 4}, 400, 400)){ // draw some graphics over the newly created psd var graphics = new aspose.psd.graphics(psd); graphics.clear(aspose.psd.color.white); graphics.drawellipse(new aspose.psd.pen(aspose.psd.color.red, 6), new aspose.psd.rectangle(0, 0, 400, 400)); psd.save();}复制代码
各种成像滤镜
用于.net的aspose.psd通过其类库提供了核心的成像功能,例如颜色调整。开发人员可以轻松调整api加载的光栅图像的亮度,对比度或伽玛。此外,开发人员可以动态抖动或模糊图像,以及使用流行的滤镜,包括median, gauss wiener, motion wiener and bradley threshold.。
如果你对aspose的产品感兴趣或有任何技术难题都可以加入aspose交流群(642018183)