Home Web Front-end PS Tutorial How to implement automatic UI cutting in Photoshop

How to implement automatic UI cutting in Photoshop

Feb 18, 2017 pm 01:28 PM

<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/imghw/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/3d8ee426c78533a11c2c5207a3c4ca09-0.png"  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/imghw/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/3d8ee426c78533a11c2c5207a3c4ca09-1.png"  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/imghw/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/3d8ee426c78533a11c2c5207a3c4ca09-2.png"  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/imghw/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/c54e7486436e4e1004199a37a8c4084b-3.png"  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/imghw/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/c54e7486436e4e1004199a37a8c4084b-4.gif"  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/imghw/default1.png"  data-src="https://img.php.cn/upload/article/000/000/013/be19b0639f62eaeb01a4166c52802994-5.png"  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>
Copy after login


Statement of this Website
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

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to set password protection for export PDF on PS How to set password protection for export PDF on PS Apr 06, 2025 pm 04:45 PM

Export password-protected PDF in Photoshop: Open the image file. Click "File"&gt; "Export"&gt; "Export as PDF". Set the "Security" option and enter the same password twice. Click "Export" to generate a PDF file.

What are the common questions about exporting PDF on PS What are the common questions about exporting PDF on PS Apr 06, 2025 pm 04:51 PM

Frequently Asked Questions and Solutions when Exporting PS as PDF: Font Embedding Problems: Check the "Font" option, select "Embed" or convert the font into a curve (path). Color deviation problem: convert the file into CMYK mode and adjust the color; directly exporting it with RGB requires psychological preparation for preview and color deviation. Resolution and file size issues: Choose resolution according to actual conditions, or use the compression option to optimize file size. Special effects issue: Merge (flatten) layers before exporting, or weigh the pros and cons.

How to use PS Pen Tool How to use PS Pen Tool Apr 06, 2025 pm 10:15 PM

The Pen Tool is a tool that creates precise paths and shapes, and is used by: Select the Pen Tool (P). Sets Path, Fill, Stroke, and Shape options. Click Create anchor point, drag the curve to release the Create anchor point. Press Ctrl/Cmd Alt/Opt to delete the anchor point, drag and move the anchor point, and click Adjust curve. Click the first anchor to close the path to create a shape, and double-click the last anchor to create an open path.

What is the reason why PS keeps showing loading? What is the reason why PS keeps showing loading? Apr 06, 2025 pm 06:39 PM

PS "Loading" problems are caused by resource access or processing problems: hard disk reading speed is slow or bad: Use CrystalDiskInfo to check the hard disk health and replace the problematic hard disk. Insufficient memory: Upgrade memory to meet PS's needs for high-resolution images and complex layer processing. Graphics card drivers are outdated or corrupted: Update the drivers to optimize communication between the PS and the graphics card. File paths are too long or file names have special characters: use short paths and avoid special characters. PS's own problem: Reinstall or repair the PS installer.

How to solve the problem of loading when PS is always showing that it is loading? How to solve the problem of loading when PS is always showing that it is loading? Apr 06, 2025 pm 06:30 PM

PS card is "Loading"? Solutions include: checking the computer configuration (memory, hard disk, processor), cleaning hard disk fragmentation, updating the graphics card driver, adjusting PS settings, reinstalling PS, and developing good programming habits.

How to speed up the loading speed of PS? How to speed up the loading speed of PS? Apr 06, 2025 pm 06:27 PM

Solving the problem of slow Photoshop startup requires a multi-pronged approach, including: upgrading hardware (memory, solid-state drive, CPU); uninstalling outdated or incompatible plug-ins; cleaning up system garbage and excessive background programs regularly; closing irrelevant programs with caution; avoiding opening a large number of files during startup.

Photoshop's Value: Weighing the Cost Against Its Features Photoshop's Value: Weighing the Cost Against Its Features Apr 11, 2025 am 12:02 AM

Photoshop is worth the investment because it provides powerful features and a wide range of application scenarios. 1) Core functions include image editing, layer management, special effects production and color adjustment. 2) Suitable for professional designers and photographers, but amateurs may consider alternatives such as GIMP. 3) Subscribe to AdobeCreativeCloud can be used as needed to avoid high one-time spending.

Photoshop for Professionals: Advanced Editing & Workflow Techniques Photoshop for Professionals: Advanced Editing & Workflow Techniques Apr 05, 2025 am 12:15 AM

Photoshop's advanced editing skills include frequency separation and HDR synthesis, and optimized workflows can be automated. 1) Frequency separation technology separates the texture and color details of images. 2) HDR synthesis enhances the dynamic range of images. 3) Automate workflows to improve efficiency and ensure consistency.

See all articles