Skip to content

Magador/ImagePacking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImagePacking

ImagePacking.php must be executed locally with the php executable. This script take some images format on input and create some DDS files on output.

⚠️ This require ImageMagick v. 6.8.6-10 set in $PATH, since the convert command is used inside the script. Check configImagick.md for more informations.

Syntax: ImagePacking.php <dirpath> [filetype [sizeofimage [outputprefix [bgcolor]]]]

dirpath The directory path containing images. Warning: if this directory contains directories containing images, those will be used too.

filetype The file extension of images. Default set to 'png'. Formats available http://www.imagemagick.org/script/formats.php

sizeofimage The size in pixels of the generated images, count as width and height. Default at 4096.

outputprefix The prefix to be set for the generated images. Default at directory name.

bgcolor The background color of the images to be processed. It also is used to set the background color of generated images. Default set to 'none' (transparent).

##Usage

For example we need to create textures from the images contained in the folder images/phone, in 2048x textures using a transparent background color. We want to name the .json and images prefixes as 'mobile'; so we use:

php ImagePacking.php images/phone png 2048 mobile

It give us one mobile.json file and some .png and .dds files.

About

From Images to DDS Textures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages