我怎样才能得到一个PSD文件的图层? [英] How can I get the layers from a PSD file?

查看:240
本文介绍了我怎样才能得到一个PSD文件的图层?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从一个PSD文件中检索的所有层,并得到他们的名字,X和Y位置。

I want to retrieve all layers from a PSD file and get their name, X and Y position.

有一个C#库,能做到这一点?

Is there a C# Lib that can do that?

我已经试过这种LIB 从$ C $的CProject ,但我总是TargetInvokeException。我的PSD文件是从Photoshop CS5 ...

I've tried this lib from CodeProject, but I always get TargetInvokeException. My PSD files are from Photoshop CS5...

探索Paint.NET罗宾建议我能得到这个code:

Exploring Paint.NET as Robin suggested I could get to this code:

var ps = new PsdFile();
ps.Load(file);
var name = ps.Layers[0].Name;
var xy = ps.Layers[0].Location;

我需要包括这些参考资料:

I needed to include these references:

  • PhotoShop.dll
  • PaintDotNet.Core.dll

推荐答案

您可以使用PSD-插件Paint.NET做到这一点。

You could use the PSD-plugin for Paint.NET to do it.

应该是相当容易从那里提取解析库。

Should be fairly easy to extract the parser library from there.

HTTP://psdplugin.$c$cplex.com/

这篇关于我怎样才能得到一个PSD文件的图层?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆