A refreshingly easy WebGL image compression tool.
Compresh makes converting to device specific GPU compressed image formats drag-and-drop easy. GPU compressed images allow more textures in memory at once than regular image formats like jpg or png, at close to the same download size (assuming the server is setup to auto gzip files). Compresh is currently in alpha and has limited options.
Compressing to different webgl texture formats requires an artist to install multiple tools, for multiple formats, which are different depending on the device platform, and with a plethora of options. Compresh tries to simplify that process to make the conversion process quick and easy, creating all necessary formats for different devices with appropriate options depending on the supplied images, so artists can get back to doing what they love rather than doing a bunch of busy work.
- Download builds/compresh_osx.tar.gz
- Unzip the file and then copy the Compresh app to your Applications folder
- Just drag and drop .png images or folders onto the window and Compresh will automatically begin converting
- Multiple formats for different devices will be placed in a folder called "compressed" within each source images folder. It also creates a quantized png (very small lossy png) as well as preview png images so you can view the quality (this will be part of the GUI later).
- After conversion, size reports will be displayed for download size (assuming the server is setup to gzip everything) and video memory (VRAM) for each image as well as totals for all images.
- Currently only runs on OS X. Windows support coming.
- The defaults are setup to work with pixi.js and pixi-compressed-textures plugin which expect premultiplied textures. Phaser currently (July 2016) does not have a compressed texture plugin but will likely expect premultiplied images as well.
- It automatically detects if an alpha channel exists and picks the appropriate format
- If image is not power of two it will automatically resize it to the nearest power of two size.
- PVRTC (iOS format) requires textures to be square and the image will be resized to square based on the largest length between width and height. Other formats will not be made square.
ATC is AMD's texture format which is used on some Android phones with Qualcomm chipsets. While Qualcomm chipsets also support ETC1, ATC is preferred because it can store an alpha channel, while ETC1 cannot and requires an extra texture to represent alpha. Compresh does not currently support ATC because third party converters with OSX/Unix support could not be found. There are a couple of things that might have OSX support in the future, but in the meantime OSX users will have to use Wine to install and run Compressonator. Here are instructions:
- Download and install xQuartz which is required for wine to work.
- Download and install Wine
- Download 32 bit version of compressonator
- To install compressonator start
Wine Staging
, cd to where you downloaded compressonator, enterwine msiexec /i Compressonator.2008-12-18-v1.50.1731.msi
- Setup with all of the default settings.
- In finder browse to (or press cmd+shift+g and paste this):
~/.wine/drive_c/Program Files/AMD/The Compressonator 1.50/
then double clickTheCompressonator.exe
to run it. - You can now open images and convert them. Access your computer's directories through the
Z:
Drive
Compresh is an Electron](https://github.com/electron/electron/blob/master/README.md) app.
To test it just run this form the src
folder:
npm install && npm start
To build it install electron packager:
https://www.npmjs.com/package/electron-packager
And run build.sh
in the src
directory and it will build to a folder called builds
in the root folder.
Compresh uses the following technologies:
- Electron, Copyright (c) 2016 GitHub Inc.
- Chromium, Copyright (c) 2016 The Chromium Authors. All rights reserved.
- Crunch-OSX, Ported by Thibaut Despoulain, Copyright (c) 2010-2016 Richard Geldreich, Jr. and Binomial LLC
- PVRTexToolCLI, Copyright (c) 2016 Imagination Technologies