Image-To-Pico8 : ImgToP8 full options list to convert images

List of options for image processing and conversion to Pico-8 with Image-To-Pico8.
-dwNNN : Set destination image Width to NNN pixels. Useful for scaling or resizing. By default it generates a 128x96 image.
-dhNNN : Set destination image Height to NNN pixels
Preserve aspect ratio by using -dwAuto for Auto Width or -dhAuto for Auto Height.
-ns (or -nosuffix or -overwrite) : no datetime based suffix at the end of the output filename. This means that the output filename will be always the same, and therefore it will overwrite. (Default is: NOT overwrite)
-output (or -outpath or -path) : Set output path. You can provide the full output path: -outpath "D:\my out path\test\"
or a sub folder of the input file: -outpath "my_sub_folder"
-ni (or -nointerp) : Don't process image color linear interpolation. (Default is Yes: Do interpolate)
-nn (or -nonoise) (previously -nr or -norandom) : Don't add random noise on colors to draw "half colors". (Default is Yes: Do use random to add some noise between 2 of the 4 color palette. This make more lively results!)
"In RGB colors, Green is brighter", but if you want to fix color brightness manually you can use -fixrgbN,N,N eg: -fixrgb30,40,30
-repeatNN : "Multiple images" = Repeat the image process NN times. For example -repeat32 -still will produce 32 preview PNG still images.
-gif : Generate an animated GIF, out of a repeated image process NN times. (v1.3 or higher) For example -gif will create a preview as an animated GIF sequence (default is a number of 8 frames), and -gif -repeat20 will create a GIF made of 20 frames, thanks to 20 repeated image processes.
It's useful when you plan to use only generated preview images or GIFs, and not copy them for Pico-8 engine.
-noisetokensNNNN : Allocate NNNN tokens of Pico-8 code to draw innerstate noise pixels and simulate image animation. For example -noisetokens2000 for 2000 tokens of Pico-8 code. (v1.7 or higher)
-nocommentsp8 : Don't write "-- comments" in Pico-8 code to reduce p8 size (in bytes). This won't reduce the number of tokens. The small program which displays the image on Pico8 screen takes only 87 tokens.
-np -nopreview : Don't output a preview PNG image.
-psN : Magnify preview image size (for example -ps2 to output a x2 scale preview PNG image, or to -ps4 for a x4 scale.)
-nop8 (or -noout) : Don't generate p8 file. Useful when you plan to use only generated preview images, and not copy them for Pico-8 engine. Default is Yes: generate a p8 file.

Palette presets - change color palette during conversion to Pico-8

Image-To-Pico8 uses 4-color palettes.
You can use any flag below to change the palette used in the output preview image.
-p1 or -orange : Palette orange
-p2 or -blue : Palette blue
-p3 or -gray or -grey : Palette gray
-p4 or -upblue : Palette upperblue
-p5 or -green : Palette green
-p6 or -pink : Palette pink

Random palette

-pr or -palrandom : Random palette = Palette made of random colors (but different colors).
-reroll : When the "multiple images" flag is set (-repeatNN) along with a random palette (-pr), set new random colors every frame. eg: -repeat10 -pr -reroll

Palette color cycling (or palette shifting)

When multiple images flag is set (-repeatNN), you can use the flag -cycle to rotate the colors of the palette.
You can use more than 4 colors to cycle,
for example: -cycle -pc1,2,3,4,5,6,7,8,9,10
Use -rcycle to cycle the colors in reverse order.

Setup your own palette - Custom palette

You can use any of the Pico-8 colors to build your own 4 color palette.
Use the flag -pcN,N,N,N to use colors N,N,N,N as custom palette. For example: -pc0,1,2,3.
All possible colors are listed below:

Original 16 Pico8 colors - Original Pico8 palette

  0 #000000 black
  1 #1d2b53 storm
  2 #7e2553 wine
  3 #008751 moss
  4 #ab5236 tan
  5 #5f574f slate
  6 #c2c3c7 silver
  7 #fff1e8 white
  8 #ff004d ember
  9 #ffa300 orange
 10 #ffec27 lemon
 11 #00e436 lime
 12 #29adff sky
 13 #83769c dusk
 14 #ff77a8 pink
 15 #ffccaa peach

Alternate "secret" 16 Pico8 colors - Extended Pico8 palette

128 #291814 cocoa
129 #111d35 midnight
130 #422136 port
131 #125359 sea
132 #742f29 leather
133 #49333b charcoal
134 #a28879 olive
135 #f3ef7d sand
136 #be1250 crimson
137 #ff6c24 amber
138 #a8e72e tea
139 #00b543 jade
140 #065ab5 denim
141 #754665 aubergine
142 #ff6e59 salmon
143 #ff9d81 coral
In Pico-8, you can use this expanded version of the original palette. A technique allows you to access these 16 new colors. Theses colors can be mixed with the original palette, but a maximum of 16 colors can be shown each frame while running your Pico-8 cartridge.
To alter the color 0 with the extended color 131, in the code tab of Pico-8, type:
pal(0,131,1)
Place it in your function _draw() before using spr or graphics primitive.

Image-To-Pico8 converter - link to software

Glitch

You can now glitch your image on x offset, with various intensities:
Use -glitchN (N = intensity = 1 to 4)
You will get better results when generating GIFs.
Other experimental flags combined with glitch:
-glitchoxawNN : width amplitude of the offset (-16 to 16)
-glitchoxsfN : progressive smooth arrival on N frames
-glitchoxmyNNN : global pos_y move of the peaks (-256 to 256)
Full example: ImgToP8 -gif -repeat32 -glitch4 -glitchoxmy-64 -glitchoxsf5 -pc136,8,142,143 "D:\Downloads\MyImage.jpg"

List of options as displayed by the built-in help (ImgToPico8 All options)

----------------------------------------------------- ---------
ImgToP8 - ImageToPico8 4-color bitmap for pico-8
          by Anto80 (@elbloco80)
----------------------------------------------------- ---------

  Usage:   ImgToP8 [Option1] [Option2] SourceImageFile [-path] [OutputPath]
  Example: ImgToP8 -orange "C:\my\path\myfile.jpg"
  Possible input formats:  JPG, PNG, BMP, PCX

Options:
  -ns -nosuffix -overwrite : no suffix on output file = overwrite
  -output -path   : Set destination full path, or subfolder name
  -dwNNN  -dhNNN  : Destination Image Width NNN and/or Height NNN
  -dwAuto -dhAuto : Preserve aspect ratio : Auto Width or Auto Height

  -p1 -orange     : Palette orange
  -p2 -blue       : Palette blue
  -p3 -gray -grey : Palette gray
  -p4 -upblue     : Palette upperblue
  -p5 -green      : Palette green
  -p6 -pink       : Palette pink
  -pr -palrandom  : Palette made of random colors
  -pcN,N,N,N      : Custom palette with color# N,N,N,N  eg: -pc0,1,2,3
  -ni -nointerp   : No interpolation (Default is Yes)
  -nn -nonoise    : No half random noise pixels
  -fixrgbN,N,N    : Fix brightness detection  eg: -fixrgb25,50,25
                     25,50,25 means Green is twice as bright as Red and Blue
  -glitchN        : Glitch on x offset,  N = intensity = 1 to 4. (Default 0)

  -np -nopreview  : No bitmap preview output
  -ps2 -ps4 -psN  : Bitmap preview output size x2 x4 xN
  -noout -nop8    : No p8 output (Do preview only)
  -repeatNN       : Repeat the process NN times to output multiple images
  -gif -makegif   : Create an animated GIF out of repeated image processes
  -still          : Create still images out of repeated image processes
  -cycle          : Cycle through all the colors during repeat. You can use
                    more than 4 colors to cycle: -cycle -pc1,2,3,4,5,6,7,8,9
  -rcycle         : Cycle all the colors of the palette in reverse order
  -reroll         : When repeat is set along with a random palette, set new
                     colors every frame.  eg: -repeat10 -pr -reroll
  -noisetokensNNNN : Allocate NNNN tokens of Pico-8 code to draw
                     innerstate noise pixels and simulate image animation
  -nocommentsp8   : Don't write -- comments in Pico-8 code to reduce size

  -l -lic -eula   : View license information, terms and conditions
  -?              : This help


Troubleshooting - Help section

Problem: By clicking on ImgToP8 (or Imgtop8.exe), a window opens and then closes immediately.
Solution: ImageToPico8 / ImgToP8 is a "command line" or console program for Windows. That is, you must first launch the Windows Command Prompt to launch it:
1. Press the Windows Start button then search
2. In the search box, type "cmd"
3. Click on the "Command Prompt" application
4. Browse the disk and folder where you installed ImgToP8.
     For example if you installed it in D:\My tools\ImgToP8\, type
     D:
     cd "D:\My tools\ImgToP8"
5. In this folder, you must have ImgToP8.exe
     You can possibly check it by typing "dir"
6. Type imgtop8 then Enter.
7. The command prompt should display:
     ImgToP8 - ImageToPico8 4-color bitmap for pico-8
Problem: You get the error message: 'ImgToP8' is not recognized as an internal command or external, an executable program or a batch file.
Solution:
1. ImgToP8 software may not be copied to your hard drive. Download ImgToP8 here and you will get a zip file. Unzip it in the folder you want (Except maybe "Program Files" or "Windows" to prevent access problems...)
2. In the command prompt, you may not be in the correct folder? Launch the Windows command prompt (steps 1 to 3 above) and navigate to the folder where you installed it (steps 4 to 7 above). You should have, at the command prompt, a phrase "ImgToP8 - ImageToPico8 4-color bitmap for pico-8" that appears.