Giter VIP home page Giter VIP logo

mobile-export-scripts-illustrator's Introduction

Mobile Export Script for Illustrator

An Illustrator Script (written in Javascript) for exporting artboards to Android and iOS PNG24 assets in the proper directory structure and scale types.

How To

  1. Import the script into Illustrator CC

To include a script in the Scripts menu (File > Scripts), save the script in the Scripts folder, located in the /lllustrator CC/Presets folder in your lllustrator CC installation directory. The script’s filename, minus the file extension, appears in the Scripts menu. Scripts that you add to the Scripts folder while Illustrator is running do not appear in the Scripts menu until the next time you launch Illustrator.

  1. Open the Illustrator file that includes the artboards you want to export.
  2. Select this script from the Illustrator Scripts menu.
  3. Choose the directory where you want the images to be exported to.
  4. A dialog with the supported scale types will open. If any Android types are selected, it's directory will be created inside /Android/{SCALE_TYPE} (e.g. /Android/drawable-mdpi, /Android/drawable-xhdpi). Any iOS types will be placed in /iOS.

The name of the exported images will match the name of the artboard. If the artboard is named app-icon, and you select all the available options, the script will export the artboard into the following directory structure:

Selected Directory
├───Android
│   ├───drawable-mdpi
│   │   └───app-icon.png
│   ├───drawable-hdpi
│   │   └───app-icon.png
│   ├───drawable-xhdpi
│   │   └───app-icon.png
│   ├───drawable-xxhdpi
│   │   └───app-icon.png
│   ├───drawable-xxxhdpi
│   │   └───app-icon.png
└───iOS
    ├───app-icon.png
    ├───[email protected]
    └───[email protected]

The baseline image used for Android is xhdpi, for iOS it is @2x. The script will scale up and down from these sizes.

License

Copyright 2016 Austyn Mahoney

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

mobile-export-scripts-illustrator's People

Contributors

austynmahoney avatar legz avatar ungesehn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.