search
HomeWeb Front-endPS TutorialHow to implement automatic UI cutting in Photoshop

<span style="font-family: Microsoft YaHei; font-size: 16px;">  切图严格来说并不是UI设计师的工作, 而是前端工程师的工作,指的是将UI设计师的设计(大部分为photoshop创建的PSD文件)转化为界面(网页或窗体等)所需要资源的过程。<br/>切图是衔接UI设计和应用程序的桥梁,是一种将设计师的“理想”转化为“现实”的工作。 由于不同人的实现方法不同,可能对切图的需求也存在一定的差异。作为前端工程师,掌握切图将为提升自己的竞争力带来一臂之力。<br/>  一般来说,photoshop可以通过手动进行切图,这样比较好控制,但是对于复杂的UI来说,往往比较费事费力。photoshop 从CC版开始对于切图的功能进行了提升。可以自动对PSD文件按图层进行自动切图(原理就是模拟人的操作,将其他图层设置为隐藏,然后对待切图的图形进行裁剪,并支持透明背景)。下面用step by step介绍一下photoshop CC如何实现自动切图:<br/>1、准备UI资源文件(一般为美工提供PSD文件)login-form.psd<br/><img src="/static/imghwm/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/3d8ee426c78533a11c2c5207a3c4ca09-0.png?x-oss-process=image/resize,p_40"  class="lazy" alt="How to implement automatic UI cutting in Photoshop"    style="max-width:90%"  style="max-width:90%" title="How to implement automatic UI cutting in Photoshop"/><br/>2、用photoshop (CC 2015)打开该文件,图层结构如下:<br/><img src="/static/imghwm/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/3d8ee426c78533a11c2c5207a3c4ca09-1.png?x-oss-process=image/resize,p_40"  class="lazy" alt="How to implement automatic UI cutting in Photoshop"    style="max-width:90%"  style="max-width:90%" title="How to implement automatic UI cutting in Photoshop"/><br/>3、photoshop中选择【文件】【导出】【将图层导出到文件】,如下图:<br/><img src="/static/imghwm/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/3d8ee426c78533a11c2c5207a3c4ca09-2.png?x-oss-process=image/resize,p_40"  class="lazy" alt="How to implement automatic UI cutting in Photoshop"    style="max-width:90%"  style="max-width:90%" title="How to implement automatic UI cutting in Photoshop"/><br/>4、打开导出到文件配置对话框,(默认将存放目录放于桌面)如下图:<br/><img src="/static/imghwm/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/c54e7486436e4e1004199a37a8c4084b-3.png?x-oss-process=image/resize,p_40"  class="lazy" alt="How to implement automatic UI cutting in Photoshop"    style="max-width:90%"  style="max-width:90%" title="How to implement automatic UI cutting in Photoshop"/><br/>选择PNG-24,勾选上透明区域、交错和裁切图层。<br/>5、单据【运行】,效果如下:<br/><img src="/static/imghwm/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/c54e7486436e4e1004199a37a8c4084b-4.gif?x-oss-process=image/resize,p_40"  class="lazy" alt="How to implement automatic UI cutting in Photoshop"    style="max-width:90%"  style="max-width:90%" title="How to implement automatic UI cutting in Photoshop"/><br/>6、根据UI复杂度不同,等候的时间不同,最后切图后的资源如下图所示(移动到文件夹中):<br/><img src="/static/imghwm/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/be19b0639f62eaeb01a4166c52802994-5.png?x-oss-process=image/resize,p_40"  class="lazy" alt="How to implement automatic UI cutting in Photoshop"    style="max-width:90%"  style="max-width:90%" title="How to implement automatic UI cutting in Photoshop"/><br/><br/>更多How to implement automatic UI cutting in Photoshop相关文章请关注PHP中文网!<br/></span>


Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How do I use Photoshop for creating social media graphics?How do I use Photoshop for creating social media graphics?Mar 18, 2025 pm 01:41 PM

The article details using Photoshop for social media graphics, covering setup, design tools, and optimization techniques. It emphasizes efficiency and quality in graphic creation.

How do I prepare images for web use in Photoshop (file size, resolution, color space)?How do I prepare images for web use in Photoshop (file size, resolution, color space)?Mar 13, 2025 pm 07:28 PM

Article discusses preparing images for web use in Photoshop, focusing on optimizing file size, resolution, and color space. Main issue is balancing image quality with quick loading times.

How do I use Photoshop's Content-Aware Fill and Content-Aware Move tools effectively?How do I use Photoshop's Content-Aware Fill and Content-Aware Move tools effectively?Mar 13, 2025 pm 07:35 PM

Article discusses using Photoshop's Content-Aware Fill and Move tools effectively, offering tips on selecting source areas, avoiding mistakes, and adjusting settings for optimal results.

How do I calibrate my monitor for accurate color in Photoshop?How do I calibrate my monitor for accurate color in Photoshop?Mar 13, 2025 pm 07:31 PM

Article discusses calibrating monitors for accurate color in Photoshop, tools for calibration, effects of improper calibration, and recalibration frequency. Main issue is ensuring color accuracy.

How do I use Photoshop's video editing capabilities?How do I use Photoshop's video editing capabilities?Mar 18, 2025 pm 01:37 PM

The article explains how to use Photoshop for video editing, detailing steps to import, edit, and export videos, and highlighting key features like the Timeline panel, video layers, and effects.

How do I prepare images for web using Photoshop (optimize file size, resolution)?How do I prepare images for web using Photoshop (optimize file size, resolution)?Mar 18, 2025 pm 01:35 PM

Article discusses optimizing images for web using Photoshop, focusing on file size and resolution. Main issue is balancing quality and load times.

How do I create animated GIFs in Photoshop?How do I create animated GIFs in Photoshop?Mar 18, 2025 pm 01:38 PM

Article discusses creating and optimizing animated GIFs in Photoshop, including adding frames to existing GIFs. Main focus is on balancing quality and file size.

How do I prepare images for print using Photoshop (resolution, color profiles)?How do I prepare images for print using Photoshop (resolution, color profiles)?Mar 18, 2025 pm 01:36 PM

The article guides on preparing images for print in Photoshop, focusing on resolution, color profiles, and sharpness. It argues that 300 PPI and CMYK profiles are essential for quality prints.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool