texture-atlas
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:C++ texture atlas generator
=== About ===

This is a simple command line tool that takes a list of PNG image files and creates a somewhat optimized texture atlas. It might rotate images if that will allow the texture atlas to be smaller.



=== Usage ===

USAGE:
   ./texture-atlas  [-i ] ...  [-q] [-y ] [-x ] [-o
                    ] [--] [--version] [-h]  ...

Where:
   -i ,  --info_writers   (accepted multiple times)
     Atlas information writers: csv

   -q,  --quiet
     Suppress processing information output.

   -y ,  --out_height 
     Maximum output atlas image's height.

   -x ,  --out_width 
     Maximum output atlas image's width.

   -o ,  --out_name 
     Output atlas image's file name.

   --,  --ignore_rest
     Ignores the rest of the labeled arguments following this flag.

   --version
     Displays version information and exits.

   -h,  --help
     Displays usage information and exits.

     (accepted multiple times)
     (required)  List of the image filenames.


   Creates a texture atlas from a list of PNG files.

Ex:
Packing three images that are 128x128, 64x64 and 256x256 to 256x256 pixel texture atlases.

$ ./texture-atlas -i csv -x 256 -y 256 image/asteroid.png image/asteroid_mineral.png image/sun.png

Packed 2 images to out_atlas_0.png with 12288 unused area Width (128) x Height (256)
image/asteroid.png => x: 0 y: 0 width: 128 height: 128
image/asteroid_mineral.png => x: 0 y: 128 width: 64 height: 64

Packed 1 images to out_atlas_1.png with 0 unused area Width (256) x Height (256)
image/sun.png => x: 0 y: 0 width: 256 height: 256


$ cat out_atlas.csv
atlas_name, atlas_packed_count, atlas_wasted_pixels, atlas_width, atlas_height, texture_name, texture_rotated_90, texture_width, texture_height, texture_x_offset, texture_y_offset
out_atlas_0.png, 2, 12288, 128, 256, image/asteroid.png, 0, 128, 128, 0, 0
out_atlas_0.png, 2, 12288, 128, 256, image/asteroid_mineral.png, 0, 64, 64, 0, 128
out_atlas_1.png, 1, 0, 256, 256, image/sun.png, 0, 256, 256, 0, 0



=== License and Acknowledgements ===

The files in png++ are from the png++ project hosted at http://savannah.nongnu.org/projects/pngpp/ and licensed under a modified BSD license. See the file png++/COPYING for more details.


The files in the texture-atlas directory are from John Ratcliff's Texture-Atlas library: http://code.google.com/p/texture-atlas/ and is licensed under the MIT License. This library is based on this paper: http://www.antisphere.com/Research/Tiles.php


The files found in the tclap directory are from the Templatized C++ Command Line Parser Library hosted at http://tclap.sourceforge.net/ and is licensed under the MIT License.


The code not found in those directories is written by Bryan Ivory and licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。