Convert PNG batch to PVR using Texturepacker under Mac

Source: Internet
Author: User

#!/bin/bash

basedir=$ (dirname)
CD $BASEDIR
Echo
Ls
Echo $BASEDIR
Echo
Read-p "WARNING: Are you sure you want to process this directory? (y/n) "RESP

If ["$RESP" = "Y"]; Then
Rm-f *.PVR.CCZ
Rm-f *.plist

Find. -name \*.png | Sed ' s/\.png//g ' | \
Xargs-i%-N 1 texturepacker%.png \
--data%-hd.plist \
--sheet%-HD.PVR.CCZ \
--allow-free-size \
--disable-rotation \
--opt RGBA4444 \
--premultiply-alpha \
--DITHER-NONE-NN \
--border-padding 0 \
--main-extension-hd. \
--autosd-variant 0.5:.

Rm-f *.plist
Else
echo "Please execute this script in the correct directory"
Fi

How to use:


1. Save the above content as a file: Genpvr.command

2. Copy the Genpvr.command to the PNG directory and click Execute.

Convert PNG batch to PVR using Texturepacker under Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.