Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

texture-compressor

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

texture-compressor

CLI tool for texture compression using ASTC, ETC, PVRTC and S3TC in DDS or PVR containers.

  • 0.0.3
  • npm
  • Socket score

Version published
Weekly downloads
132K
decreased by-6.56%
Maintainers
1
Weekly downloads
 
Created
Source

Texture compressor

CLI tool for texture compression using ASTC, ETC, PVRTC and S3TC in DDS or PVR containers.

Easily compress for all hardware using sensible defaults but with the option to pass any custom flag directly to the tool.

Installation

$ npm install -g --save texture-compressor

Example

ASTC

# ASTC - Supported by all iOS devices with an A8 processor or higher (iPhone 6+)
# Astcenc - https://github.com/ARM-software/astc-encoder
# DDS container
# Extension - https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_astc/

$ node ./bin/texture-compressor -i ./example/example.png -o ./example/example-astc.dds -m astc -c astc

ETC

# ETC1 & ETC2 - Supported by most Android devices
# Etc2comp - https://github.com/google/etc2comp
# DDS container
# Extension - https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc/

$ node ./bin/texture-compressor -i ./example/example.png -o ./example/example-etc1.dds -m etc -c etc1

PVR

# PVRTC1 - Supported by all iOS devices and some Android devices
# PVRTexTool - https://community.imgtec.com/developers/powervr/tools/pvrtextool/
# PVR container
# Extension - http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_pvrtc/

$ node ./bin/texture-compressor -i ./example/example.png -o ./example/example-pvrtc1.pvr -m pvr -c pvrtc1

S3TC

# DXT1 & DXT3 & DXT5 - Supported by all desktop devices and some Android devices
# Crunch - https://code.google.com/archive/p/crunch/
# CRN & DDS container
# Extension - http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/

$ node ./bin/texture-compressor -i ./example/example.png -o ./example/example-dxt5.dds -m s3tc -c dxt5

Flags

Required

-c, --compression ['astc', 'etc1', 'etc2', 'pvrtc1', 'dxt1', 'dxt3', 'dxt5'] [required]
-i, --input [example: ./example/example.png] [required]
-o, --output [example: ./example/example.dds] [required]
-m, --method ['astc', 'etc', 'pvr', 's3tc'] [required]

Optional

-b, --bitrate [2.0 - 4.0, default: 2.0 = 8x8 blocksize] [not required]

Or if using ASTC you can optionally change the bitrate for one of the following blocksizes:
[4x4, 5x4, 5x5, 6x5, 6x6, 8x5, 8x6, 8x8, 10x5, 10x6, 10x8, 10x10, 12x10, 12x12] [not required]

-q, --quality [0 - 10, default: 5] [not required]
-t, --transparant [true / false, default: false] [not required]

Tool flags

-f, --flags ["flag value" "flag value"] [not required]

Licence

My work is released under GNU General Public License v3.0.

Much has been based on the automated texture compression tool baked into gltf-pipeline.

This repository distributes multiple binary tools for Windows, Mac and Linux.

FAQs

Package last updated on 21 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc