How to convert image to PVRTC format

I use a terminal to convert a jpg image called left to pvrtc , and this happens:

 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC --bits-per-pixel-2 -o left.pvrtc left.jpg Failed to load image Failed to perform Encode 
+4
source share
1 answer

Edit:

 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC --bits-per-pixel-2 -o left.pvrtc left.jpg 

To:

 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC --bits-per-pixel-2 -o left.pvr left.PNG 

File must be PNG

Updated OSX 10.10 + instructions

In terminal, press cd to make sure you are in the root directory.

 cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ && ls 

This should show you a list of all the tools there (make sure you see texturetool ). If you do not, upgrade your OS and then Xcode

Once you know it, cd go back to your root and run the tool, for example:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC --bits-per-pixel-2 -f PVR -o [new path to pvr to go] [path of original png]

Your pvr output may be ~/whatever/image.pvr , and your png input is the path to your image that needs to be converted.

HERE and HERE is another good walkthrough

iPhone SDK includes a tool that allows you to create textures in the PVRTC compression format, aptly named texturetool . If you have installed Xcode with the iPhone OS 2.2 SDK in the default location (/ Developer / Platforms /), then texturetool is located at /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool .

texturetool allows you to create four variations of PVRTC data, with the main difference being the trade-off between quality and size. You will need to experiment with these options to determine which option is the best compromise for each individual texture image.

HERE is the same code that will help you after your PVRTC file

HERE - a few more documents

HERE is a good read in PVRTC stuff

+2
source

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


All Articles