Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is a common problem in 2D computer graphics. The overall question that needs to be asked is what you want to accomplish. Is it:</p> <ol> <li>Do you want a smaller 8 bits per pixel image that most closely represents the original image just in a smaller form?</li> <li>Do you want a smaller 8 bits per pixel image that has the same identical indexed color map (palette) as the original image?</li> </ol> <p>For example, when I was designing 2D games that operated on 8bpp displays, I asked the artists to produce all original source images in 24-bit color at full resolution. Then, I created a workflow process that unified their color palettes all at once, so they all used an optimized palette and were represented as accurately as possible. If this is your case, I'd suggest you go back to the original source image and reconvert it to the smaller size.</p> <p>Sometimes, I'm doing a one off experiment, or working with art on the fly, and I don't care about making sure all images use an identical palette. In this case, I would convert the image to 24bpp in memory, resize it using bicubic interpolation (which is a high quality resizing algorithm), and then reconvert it back to 8bpp. The downside is that doing it this way generates a new and unique palette for the resized image.</p> <p>But if you really want to resize the image without changing the palette and without upconverting to 24bpp internally, you have to use one of two really bad choices: you can either use dithering to attempt to pick the best color according to the size maps - a process that is tricky and involves carefully tracking your color error - or you can simply drop scan lines until the image matches the correct size you want. </p> <p>For reference, traditional 2D consoles like the Neo Geo followed the "line drop" approach, which results in their quaint and jagged graphics appearance today. Modern consoles always resample images in 16, 24, or 32 bit color, sometimes even using floating point to represent color values.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload