GithubHelp home page GithubHelp logo

lronaldo / img2cpc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from augustoruiz/img2cpc

1.0 1.0 0.0 9.62 MB

Tool to convert images in a lot of formats to data that can be used in Amstrad CPC software

License: MIT License

Shell 0.20% C++ 85.08% C 14.72%

img2cpc's Introduction

img2cpc

Tool to convert images in a lot of formats to data that can be used in Amstrad CPC software

img2cpc - (c) 2007-2015 Retroworks.

Usage

img2cpc [OPTIONS] fileNames

Options

--help Help. Show usage.

-bn, --baseName ARG Tile base name. If not set, the filename will be used.

-f Create a flipped values look-up table for the current palette and mode.

-fwp, --firmwarePalette ARG1[,ARGn] Palette specified in firmware values.

-g, --generatePNG Generates PNG images, one per tile and one per mask (if transparency is set).

-h, --tileHeight ARG Tile height. If not set, the image height is used.

-hwp, --hardwarePalette ARG1[,ARGn] Palette specified in hardware values.

-im, --interlacedMasks Interlaced masks. Mask values will be interlaced with pixel values.

-m, --mode ARG Specifies the CPC Mode to generate data for. Valid values are 0 (default), 1 or 2.

-map, --tilemap Generate tile map

-o, --outputFileName ARG Output file name. Default value is gfx. img2cpc will append the proper extension based on format.

-of, --outputFormat ARG Output format. If not set, data will be generated in assembly format.

-opfw Output palette (firmware values)

-ophw Output palette (hardware values)

-p, --palette ARG Specifies input palette file.

-rgbp, --rgbPalette ARG1[,ARGn] Palette specified in RGB values. RGB values must be specified as 0xRRGGBB, where RR, GG and BB are hexadecimal, or as an int value.

Examples: 0x1122FF, 255

-s, --scanlineOrder ARG1[,ARGn] Scanline order. Default value is 0,1,2,3,4,5,6,7

-t, --transparentColor ARG Specifies transparent color (as index in palette).

-w, --tileWidth ARG Tile width. If not set, the image width is used.

-z, --zigzag Zigzag. Generate data in zigzag order.

Examples

img2cpc -w 8 -h 8 --outputFormat asm -bn tile -m 0 tiles.png

Use palette in src/config_rgb.json, output C format, images in mode 0, output file name gfx.c, create PNGs, base name: tile, tile size 32x32. img2cpc -p src/config_rgb.json -of c -m 0 -o gfx.c -g -bn tile -h 32 -w 32 bee.png

Use palette in src/config_rgb.json, transparent color is 0, output C format, images in mode 0, output file name gfx.c, create PNGs, base name: tile, tile size 32x32. img2cpc -p src/config_rgb.json -t 0 -of c -m 0 -o gfx.c -g -bn tile -h 32 -w 32 bee.png

Use palette in src/config_rgb.json, transparent color is 12, output ASM format, images in mode 0, output file name gfx.s, one tile in image. img2cpc -p src/config_rgb.json -t 12 -of asm -m 0 -o gfx.s RYU_STAND_0.png

Use palette in src/config_rgb.json, transparent color is 12, output ASM format, images in mode 0, output file name gfx.s, one tile in image, data in zigzag. img2cpc -p src/config_rgb.json -t 12 -of asm -m 0 -o gfx.s -z RYU_STAND_0.png

Use palette in src/config_rgb.json, transparent color is 12, output ASM format, images in mode 0, output file name gfx.s, one tile in image, data in zigzag, scanline order 0, 1, 2, 3, 7, 6, 5, 4. img2cpc -p src/config_rgb.json -t 12 -of asm -m 0 -o gfx.s -z -s 0,1,2,3,7,6,5,4 RYU_STAND_0.png

If you liked this program, drop an email at: [email protected]

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.