low-color hires (640x480) images

Chat about anything CX16 related that doesn't fit elsewhere
Post Reply
User avatar
desertfish
Posts: 1098
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

low-color hires (640x480) images

Post by desertfish »


Hi, I've been experimenting a bit with converting large true-color images  to the x16.

Long story short, for the hi-res screenmode (640x480 pixels) there's only enough VRAM to display very few colors. 8 to be precise.  (if you use only 640x400 pixels, you can go up to 16)

For the lo-res screenmode such few colors would result in pretty bad looking photos, but for the hi-res screenmode and with some careful color reduction and dithering, you can get pretty amazing results even with just eight colors:

racecar640-x16.png.fd7f15bdc11daa3cb52b8c73ba21296c.pngwave640-x16.png.1e83d2e827d5c76eb210ce0e214edfa9.pngface640-x16.png.cafe032f41040b0d7999f30e0adf1c08.pngjapan640-x16.png.66efdd6308a6daf9dae99af554e12cdb.png

 

Note: these are not screen captures, these are just offline generated converted images that a little python script created from the truecolor source images.  But at 640 x 480 with 8 colors from the 4096 color palette of the x16, they could be displayed as seen above.

Here's the script  x16paletteconv.py

(The script assumes the source image has already been cropped and scaled to the correct resolution. I also tried using imagemagick's convert tool earlier but I couldn't make it to keep the correct color palette when reducing the number of colors, so I had to find a weird workaround as you can read in the python script's code comments)

 

Guybrush
Posts: 63
Joined: Fri Jul 10, 2020 10:38 pm

low-color hires (640x480) images

Post by Guybrush »


Unfortunately, the X16 is not an Amiga and doesn't have a 3-bit color mode.

User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

low-color hires (640x480) images

Post by Cyber »


Very impressive!

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

low-color hires (640x480) images

Post by SlithyMatt »


I have it loading in the emulator. I set the VSTART and VSTOP to crop and center the first 400 lines of the display.

Sreenshot

The code is here: https://github.com/SlithyMatt/x16-hires-bitmap

You can easily modify this to take any 640x400x16 bitmap

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

low-color hires (640x480) images

Post by SlithyMatt »


For instance: 
Screenshot_x16proto3.png
User avatar
desertfish
Posts: 1098
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

low-color hires (640x480) images

Post by desertfish »



On 1/27/2022 at 1:36 AM, Guybrush said:




Unfortunately, the X16 is not an Amiga and doesn't have a 3-bit color mode.



damn, that is true!  So we don't even have to drop down to 8 colors! 

Just use 16 colors (and make sure the image is cropped to 640x400 or so to still fit into Vram)

Here's the 16 color 640x400 version of that woman's portrait image. The colors are a lot more pronounced already

face640-x16.png.9a9a9d0673686c8620aed89054d628e2.png

Post Reply