Git Product home page Git Product logo

preview-dds's Introduction

preview-dds

stable

Preview and convert DDS files from the command line (compressed textures and HDR cubemaps).

This only supports a limited range of DDS formats, see here.

Install

npm install preview-dds -g

Usage

NPM

The CLI options are as follows:

Usage:
  preview-dds file [opt]

Options:
  --level, -l   optional mipmap level (default 0)
  --face, -f    optional cubemap face to preview (default all)
  --output, -o  write image to stdout (default: not used)
  --quality, -q if output is JPG, encoder quality (0.0 - 1.0)

Basic Examples

Preview a cubemap as an unwrapped cross:

preview-dds my-cubemap.dds

Or, preview a single face and mipmap level of the cubemap:

preview-dds my-cubemap.dds --level=1 --face=px

Where face option can be a string like px, py, or pz -- or a number index into the faces array (see cube-face-name).

If no face is specified, all faces are shown together.

Convert DDS to PNG/JPG

You can also use this tool to extract compressed textures and cube faces from a DDS file, by specifying --output=png|jpg.

For example:

preview-dds my-cubemap.dds --output=jpg -q 0.8 -l 2 -f px > cube-face.jpg

The above writes a new file cube-face.jpg with a quality of 0.8, showing mipmap level 2 and the "positive x" face. Result:

face

The --output flag (or -o) defaults to PNG.

License

MIT, see LICENSE.md for details.

preview-dds's People

Contributors

mattdesl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.