Giter Site home page Giter Site logo

shinmai / pngtopi1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benjihan/pngtopi1

0.0 0.0 0.0 83 KB

PNG image and Atari Degas Image (PI1,PC1,PI2,PC2,PI3,PC3) converter and vice versa

License: GNU General Public License v3.0

Shell 14.52% C 72.82% Makefile 8.87% Roff 3.80%

pngtopi1's Introduction

pngtopi1 - PNG/Degas image file converter


Usage

 pngtopi1 [OPTION] <input> [<output>]

Options

Short Long options Description
-h --help --usage Print this help message and exit
-V --version Print version message and exit
-q --quiet Print less messages
-v --verbose Print more messages
-c --color=XY Select color conversion method (see below)
-e --ste STE colors (short for --color=4r)
-z --pcx Force output as a pc1, pc2 or pc3
-r --pix Force output as a pi1, pi2 or pi3
-d --same-dir automatic save path includes input path

When creating Degas image the <input> image resolution is used to select the <output> type.

  • PI1 / PC1 images are 320x200x16 colors
  • PI2 / PC2 images are 640x200x4 colors
  • PI3 / PC3 images are 640x400x2 monochrome (black and white)

Automatic output name

  • If <output> is omitted the file path is created automatically.
  • If the --same-dir option is omitted the output path is the current working directory. Otherwise it is the same as the input file.
  • The filename part of the <output> path is the <input> filename with its dot extension replaced by the output format natural dot extension.

Output type

  • If --pix or --pcx is specified the <output> is respectively a raw (PI?) or rle compressed (PC?) Degas image whatever the <input>.
  • If <input> is a PNG image the default is to create a PI? image unless a provided <output> suggest otherwise.
  • If <input> is a Degas image the default is to create a PNG image unless a provided <output> suggest otherwise.
  • If pngtopi1 detects a discrepancy between a provided <output> filename extension and what is really going to be written then it issues a warning but still process as requested. Use -q to remove the warning.

Color conversion mode (--color)

  • The X parameter decides if a Degas image will use 3 or 4 bits per color component. The consequence might be the lost of a precious colormap entry in some (rare) cases if the provided input image was not created accordingly.

  • The Y parameter picks the method used to upscale 3/4 bits color component to 8 bits.

    Y Name Description Example
    z Zero-fill Simple Left shift. $5 -> 3:$40 4:$50
    r Replicated Replicate left bits $5 -> 3:$49 4:$55
    f Full-range Ensure full range $5 -> 3:$48 4:$55

Build

make D=0

Or alternatively have a look at the _build directory:

cd _build/i686-w64-mingw32
../compile

Makefile variables

Variable Description Default value
PKGCONFIG pkg-config program pkg-config
PNGVERSION libpng version $(PKGCONFIG) libpng --modversion
PNGCFLAGS libpng CFLAGS $(PKGCONFIG) libpng --cflags
PNGLIBS libpng LDLIBS $(PKGCONFIG) libpng --libs
prefix install location undefined
datadir data files location $(prefix)/share
D=1 Compile with debug 0

pngtopi1's People

Contributors

benjihan avatar shinmai 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.