Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

根据定位数据精确裁切图片 #2

Open
Onesimu opened this issue Nov 15, 2019 · 1 comment
Open

根据定位数据精确裁切图片 #2

Onesimu opened this issue Nov 15, 2019 · 1 comment

Comments

@Onesimu
Copy link

Onesimu commented Nov 15, 2019

现在的切图位置是通过算法识别, 是否可以通过输入精确的定位数据, 在图片上精确的切出每个图层呢?
比如, 我通过Photoshop CC的获取css功能, 可以得到每个图层精确的定位数据, 都是相对于左上角的绝对定位
https://github.com/Onesimu/PhotoshopCopyCSS/blob/5cfe7e9c443520c3c26f87a3d1f378f63db00f03/src/demo/demo.html
是否可以通过这些定位值, 精确的从图片上切出每个图层呢?

修改过的获取css的脚本是这个
https://github.com/Onesimu/PhotoshopCopyCSS/blob/5cfe7e9c443520c3c26f87a3d1f378f63db00f03/src/CopyCSSToClipboard-original.jsx

@xingqiao
Copy link
Owner

现在还不支持,不过是可以实现的。还有个方案是直接导入psd文件,根据指定的图层分组进行切图,这样可以做得更精细 些

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants