Small refactor for consistency, updated README for output-png option
This commit is contained in:
parent
289bd36ff1
commit
e179e947f1
|
@ -17,6 +17,7 @@ usage
|
|||
--output-bitplanes
|
||||
--output-mask
|
||||
--output-copperlist
|
||||
--output-png
|
||||
--extra-half-brite
|
||||
--ham
|
||||
--ham-brute-force
|
||||
|
@ -33,6 +34,7 @@ The following files can be generated:
|
|||
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
|
||||
-------
|
||||
|
@ -76,6 +78,11 @@ Generate m68k assembler instructions to install the palette. No symbols are gene
|
|||
|
||||
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.
|
||||
|
|
|
@ -353,7 +353,7 @@ generateEHBImage(imagecon_image_t* ic)
|
|||
|
||||
|
||||
static void
|
||||
processFile(char* outFilename, imagecon_image_t* ic)
|
||||
processFile(imagecon_image_t* ic, char* outFilename)
|
||||
{
|
||||
if (config.verbose) {
|
||||
printf("processFile...\n");
|
||||
|
@ -555,7 +555,7 @@ main(int argc, char **argv)
|
|||
if (strchr(inputFile, ',') == 0) {
|
||||
imagecon_image_t ic = {0};
|
||||
png_read(&ic, inputFile);
|
||||
processFile(outputFile, &ic);
|
||||
processFile(&ic, outputFile);
|
||||
} else {
|
||||
char** files;
|
||||
int numFiles;
|
||||
|
@ -570,7 +570,7 @@ main(int argc, char **argv)
|
|||
|
||||
imagecon_image_t combined;
|
||||
combineImages(images, numFiles, &combined);
|
||||
processFile(outputFile, &combined);
|
||||
processFile(&combined, outputFile);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -77,17 +77,12 @@ typedef struct {
|
|||
#include "palette.h"
|
||||
#include "quant.h"
|
||||
#include "utils.h"
|
||||
#include "png.h"
|
||||
|
||||
extern imagecon_config_t config;
|
||||
|
||||
extern void
|
||||
abort_(const char * s, ...);
|
||||
|
||||
extern void
|
||||
png_read(imagecon_image_t* ic, char* file_name);
|
||||
|
||||
extern void
|
||||
png_write(imagecon_image_t* ic, char* file_name);
|
||||
|
||||
void
|
||||
generateQuantizedImage(imagecon_image_t* ic, int usePalette);
|
||||
|
|
Loading…
Reference in New Issue