开发者

What is etc1tool?

I've seen the android SDK platform-tools folder has a program named etc1tool.

It says it converts PNG files into ETC1, but what is ETC1 file?

I don't understand what is it and when use it.

The help (below), ubuntu man page, and android doc don't seem to explain it either.

$ ./etc1tool --help
./etc1tool infile [--help | --encode | --encodeNoHeader | --decode] [--showDifference difffile] [-o outfile]
    Default is --encode
        --help           print this usage information.开发者_如何学Python
        --encode         create an ETC1 file from a PNG file.
        --encodeNoHeader create a raw ETC1 data file (without a header) from a PNG file.
        --decode         create a PNG file from an ETC1 file.
        --showDifference difffile    Write difference between original and encoded
                                     image to difffile. (Only valid when encoding).
    If outfile is not specified, an outfile path is constructed from infile,
    with the apropriate suffix (.pkm or .png).

Note [sic] for "apropriate".


A Compressed Texture. Spec is here.


Its a tool that compressed the size of your image (If not compressed) here its a usage of etc1tool

go to terminal

  • 1) cd AndroidSDK/platform-tools/
  • 2)./etc1tool /Users/c68/Desktop/Imgcopy.png

You should get Imgcopy.pkm ,A compreesded version of your image

now we need to decode .PKM file , Use below command to decode your file

  1. ./etc1tool --decode /Users/c68/Desktop/imgcopy.pkm

Done!!

You will get your compressed version of the image with same named as Imgcopy.png.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜