What is etc1tool?

I saw that in the toolbox of the Android SDK platform there is a program called etc1tool .

It says that it converts PNG files to ETC1, but what is an ETC1 file?

I do not understand what it is and when it is used.

The help (below), the ubuntu user page , and the android doc do not seem to explain either.

  $ ./etc1tool --help
 ./etc1tool infile [--help |  --encode |  --encodeNoHeader |  --decode] [--showDifference difffile] [-o outfile]
     Default is --encode
         --help print this usage information.
         --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 "suitable".

+4
source share
2 answers

Compressed texture. Spec here .

+5
source

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

go to terminal

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

You should get Imgcopy.pkm, a summary version of your image

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

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

Done !!

You will get a compressed version of the image with the same name as Imgcopy.png .

+1
source

Source: https://habr.com/ru/post/1340047/


All Articles