AmigaExamples/tools/imagecon
alpine9000 ffc5f1f93d Got build working on newer OSX, included missing ADFs 2019-06-11 13:58:03 +10:00
..
reference updated tool tests 2016-05-18 15:47:31 +10:00
test-images Refactored imagecon tests 2016-03-14 13:05:50 +11:00
Makefile Refactored imagecon tests 2016-03-14 13:05:50 +11:00
README.md Small refactor for consistency, updated README for output-png option 2016-03-14 13:12:34 +11:00
TODO.txt Forgot to add a file 2016-03-14 13:15:01 +11:00
color.c Added some consistency 2016-03-11 21:31:54 +11:00
color.h Refactored some functions into more appropriate files 2016-03-09 20:21:39 +11:00
dither.c Added some consistency 2016-03-11 21:31:54 +11:00
dither.h Tried to do sliced ham 2016-03-11 18:46:00 +11:00
file.c Basic dithering, file refactor 2016-03-08 12:32:16 +11:00
file.h Basic dithering, file refactor 2016-03-08 12:32:16 +11:00
ham.c Added some consistency 2016-03-11 21:31:54 +11:00
ham.h Tried to do sliced ham 2016-03-11 18:46:00 +11:00
imagecon.c simple menu screen 2016-05-14 16:44:13 +10:00
imagecon.h simple menu screen 2016-05-14 16:44:13 +10:00
palette.c bees wip 2016-05-17 07:55:44 +10:00
palette.h Added some consistency 2016-03-11 21:31:54 +11:00
png.c Refactored imagecon tests 2016-03-14 13:05:50 +11:00
png.h Forgot to add a file 2016-03-14 13:15:01 +11:00
quant.c Got build working on newer OSX, included missing ADFs 2019-06-11 13:58:03 +10:00
quant.h Tried to do sliced ham 2016-03-11 18:46:00 +11:00
rgba8.png Simple blit kinda works 2016-03-03 11:48:47 +11:00
sliced_ham.c Tried to do sliced ham 2016-03-11 18:46:00 +11:00
utils.c Added some consistency 2016-03-11 21:31:54 +11:00
utils.h Added some consistency 2016-03-11 21:31:54 +11:00

README.md

imagecon

Generate amiga data/files from a PNG image file.

usage

    imagecon: --input <input1.png,input2.png...> [options]
    options:
      --output <output prefix>
      --colors <max colors>
      --quantize
      --output-palette
      --output-palette-asm
      --output-grey-palette-asm
      --output-bitplanes
      --output-mask
      --output-copperlist
      --output-png
      --extra-half-brite
      --ham
      --ham-brute-force
      --dither
      --use-palette <palette file>
      --verbose

The following files can be generated:

  1. <output prefix>.bin binary interleaved bitplane data
  2. <output prefix>-ham.bin binary interleaved bitplane data for --ham mode
  3. <output prefix>-copper-list.s m68k assembler syntax copper list with no symbols
  4. <output prefix>-palette.s m68k assembler syntax code to install the color palette (preserves all registers)
  5. <output prefix>.pal palette file listing the palette colors as hex
  6. <output prefix>-mask.bin binary interleaved bitplane mask
  7. <output prefix>-converted.png paletted PNG version of converted file

options

--input <input1.png,input2.png...>

Specify the file(s) to be processed. Multiple files are comma separated. If bitplane output is directed, the bitplane data is stacked vertically. For images that need right padding, each line is right padded with the pixel in coloumn zero of that line.

--output <output prefix>

Specify the prefix for the output file set. Extentions will be added to this. Default is the input file name minus the extension.

--colors <max colors>

Specify the maximum number of colors allowed in the palette. Acceptable values are from 2 to 32.

--quantize

Convert the image to use less colors.

--output-bitplanes

Output the binary bitplane data in interleaved format

--output-copperlist

Output the copper is as a series of m68k instructions (No labels are generated)

--output-mask

Output the binary bitplane data for use as a blitter source mask. Note: Be careful using this feature combined with color quantization. It's possible the transparent color might get quantized resulting in an bad mask.

--output-palette

Generate a palette file of the final palette used. Output will be the output file with the ".pal" extension.

--output-palette-asm

Generate m68k assembler instructions to install the palette. No symbols are generated. Registers are preserved.

--output-grey-palette-asm

Generate m68k assembler instructions to install a greyscale version of the palette. No symbols are generated. Registers are preserved.

--output-png

Generate a paletted PNG file based on the final converted data.

--extra-half-brite

Generate an extra half brite image. This only works in combination with --colors 32. A 32 color palette will be output, however there will be a sixth bitplane that includes the half brite control bits for any pixels that can use it.

--ham

Generate bitplane and palette data for the OCS HAM mode.

--ham-brute-force

Use a primitive brute force method to calculate the HAM base palette (Otherwise --quantize --colors 16 will be used).

--dither

Apply additional dithering to the image.

--use-palette <palette file>

Specify a palette file to use that will override the image or quantized palette. Overrides the --colors and --quantize options.

--verbose

Display debugging information

example

Create a copper list and bitplane data file with an automatically generated 32 color palette.

    ./imagecon --input full_color.png --output image-data --quantize --colors 32 --output-bitplanes --output-copperlist

Create a shared palette based on two files, then use that palette to generate image and copper list data for each file.

    ./imagecon --input file1.png,file2.png --output shared --quantize --colors 32 --output-palette
    ./imagecon --input file1.png --output file1 --use-palette shared.pal --output-bitplanes --output-copperlist
    ./imagecon --input file2.png --output file2 --use-palette shared.pal --output-bitplanes --output-copperlist

Create dithered HAM data

    ./imagecon --input full_color.png --output ham --ham --dither