Graphic conversion for any 256x192 into MSX1 graphics (Source code in Blitz Basic).

Page 2/14
1 | | 3 | 4 | 5 | 6 | 7

By LeandroCorreia

Paladin (944)

LeandroCorreia's picture

28-03-2019, 21:46

They could not, even if they had insane processing power. The used formula was created only in 2000. But I see your point. Wink

By wimpie3

Champion (259)

wimpie3's picture

28-03-2019, 21:50

I'd love to see a Python implementation of this!

By dumfrog

Resident (38)

dumfrog's picture

28-03-2019, 23:06

@LeandroCorreia : Thank you for this post :-)

As I thought you were lost in deep space, I had started, before Christmas, working on my own version.

But due to lack of time, I was still wondering which conversion method I could use, as RGB and CieLab were quite weird, as you can see :

By Louthrax

Prophet (2082)

Louthrax's picture

28-03-2019, 23:22

dumfrog wrote:

@LeandroCorreia : Thank you for this post :-)
But due to lack of time, I was still wondering which conversion method I could use, as RGB and CieLab were quite weird, as you can see :

That's the same problem I was facing with CIEDE2000 for my tools... The results you are getting are very close to mine: lots of ugly dark-green use with RGB mode, and sometimes a lower amount of colors used with CIEDE2000. I might be wrong but I'm afraid your code is OK Smile

By LeandroCorreia

Paladin (944)

LeandroCorreia's picture

29-03-2019, 00:41

Louthrax wrote:
dumfrog wrote:

@LeandroCorreia : Thank you for this post :-)
But due to lack of time, I was still wondering which conversion method I could use, as RGB and CieLab were quite weird, as you can see :

That's the same problem I was facing with CIEDE2000 for my tools... The results you are getting are very close to mine: lots of ugly dark-green use with RGB mode, and sometimes a lower amount of colors used with CIEDE2000. I might be wrong but I'm afraid your code is OK Smile

RGB is device dependent, so there's no direct conversion from RGB to Lab (which may cause these flaws). Another less intelligent solution would be to save a huge bitmap with all possible RGB colors, convert it to Lab in Photoshop, save the Lab channels in separate images, read these and create a file with all possible RGB to Lab values according to Adobe. Maybe it'd work better. Wink

By Louthrax

Prophet (2082)

Louthrax's picture

29-03-2019, 22:53

Yeah, not sure... About the ugly green color that you often get when using RGB color distance with MSX 1 palette, my feeling is that even slight differences in RGB rendering would still yield the same match, because that dark-green color is the closest in a "linear" RGB cube space, and MSX palette 1 does not have too much other options in that dark area ?

Using CIEDE2000, the closest option to the dark-blue color of Luigi's leg in the example above is the same ligher blue color as the main part of the leg (and there are no best alternatives). I'd be happy to be proven wrong, but my current feeling here is that the math and implementations here are just right.

Also, when we do your conversions tests on PC/Mac/Linux, the original image and the resulting one are always displayed on the same RGB based monitor? But now that you talk about it, I remember some different RGB specs differences linked to Adobe or Microsoft... (sRGB or something ??).

I also remember another anoying point when I was working on CIEDE2000 support for MIFui: it does not define a color space, just a color distance. So you can't use dithering in CIEDE2000 (I was still using RGB to perform the error diffusion). That can be done in the LAB space of course, but I got crappy results with that approach (that could have been a bug, I did not insist too much....).

By LeandroCorreia

Paladin (944)

LeandroCorreia's picture

30-03-2019, 00:13

Louthrax wrote:

I also remember another anoying point when I was working on CIEDE2000 support for MIFui: it does not define a color space, just a color distance. So you can't use dithering in CIEDE2000 (I was still using RGB to perform the error diffusion). That can be done in the LAB space of course, but I got crappy results with that approach (that could have been a bug, I did not insist too much....).

In my program, for each pixel octet, program tests all possible MSX color permutations and an extra virtual color that's an RGB average of both. Since this extra virtual color cannot exist, I simply use dither if it's the best for the pixel.

By LeandroCorreia

Paladin (944)

LeandroCorreia's picture

30-03-2019, 01:25

WARNING:

Jannone warned me that there's a > missing in my code. I tried to run it and it did not work. Maybe during paste some characters got missing due to some weird bug. So I'm pasting it on Pastebin.

https://pastebin.com/17gMqBLM

By Rogerup

Resident (38)

Rogerup's picture

30-03-2019, 03:14

The post here understood the code between < > as a command.

By Rogerup

Resident (38)

Rogerup's picture

30-03-2019, 14:38

The system didn't substitute some < > by "& lt;" and "& gt;" in the html.

Page 2/14
1 | | 3 | 4 | 5 | 6 | 7