Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - RgbQuant-SMS - reduce the tile count of your images

Reply to topic Goto page Previous  1, 2
Author Message
  • Joined: 09 Jun 2014
  • Posts: 378
Reply with quote
Post Posted: Thu Aug 10, 2023 1:17 am
About RgbQuant-SMS. I noticed Ordered2x1 is an command line option, but it is not available in the DithKern dropdownlist.

Is Ordered2x1 the super basic checkerboard dithering? I usually prefer that type of dithering.
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 874
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Thu Aug 10, 2023 9:07 am
slogra wrote
About RgbQuant-SMS. I noticed Ordered2x1 is an command line option, but it is not available in the DithKern dropdownlist.

Is Ordered2x1 the super basic checkerboard dithering? I usually prefer that type of dithering.

Yes, I still haven't updated the site with the newer version, though it is already working on the command line version; then"Ordered2x1" pattern dithers between 2 columns of pixels, resulting in a vertical striped pattern that, hopefully, should look better on a CRT.
image.png (19.93 KB)
Ordered2x1 example
image.png

  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 874
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Thu Aug 10, 2023 11:08 pm
BTW, I'm experimenting with using RgbQuant-SMS to create a Sega Genesis Video encoder/player

Experimental encoder: https://github.com/haroldo-ok/sgdk-video-player
Youtube video with the experiment in action:
  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 378
Reply with quote
Post Posted: Fri Aug 11, 2023 8:13 am
A genesis video player with SMS colors. Looking cool already.
As the normal Genesis palette does not have the correct SMS colors, are you going to switch to a mode with accurate SMS colors?

About dithering i was actually referring to checkered dithering as in the attachment. At Imagemagick site they call it 2x1 or checks.
https://legacy.imagemagick.org/Usage/bugs/ordered-dither/
orig_2x1.gif (485 B)
orig_2x1.gif

  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 874
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Fri Aug 11, 2023 9:38 am
slogra wrote
A genesis video player with SMS colors. Looking cool already.
As the normal Genesis palette does not have the correct SMS colors, are you going to switch to a mode with accurate SMS colors?

About dithering i was actually referring to checkered dithering as in the attachment. At Imagemagick site they call it 2x1 or checks.
https://legacy.imagemagick.org/Usage/bugs/ordered-dither/


Yes, it would be better if the conversion tool could be able to use the Genesis palette; I started to implement that option, but something was overflowing, so I'm leaving that for later, since there is so much else to implement.

If you want a checkered dithering, you could use the other "ordered" options, though they can produce artifacts on a CRT.
  View user's profile Send private message Visit poster's website
  • Joined: 24 Mar 2021
  • Posts: 120
Reply with quote
Post Posted: Fri Aug 11, 2023 5:48 pm
slogra wrote
However the output is very random/inconsistent though, which i don't really understand.
Tiledpalettequant is explicitly RNG-fed. It picks a random palette entry and adjusts it to improve the quantization, many thousand times.
  View user's profile Send private message
  • Joined: 25 Feb 2006
  • Posts: 874
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Version 0.2.1 is now available!
Post Posted: Tue Aug 15, 2023 10:03 pm
Version 0.2.1 has been released; summary of updates since last version:
- Uses 3 times less RAM when converting;
- Published as a npm package: https://www.npmjs.com/package/rgbquant-sms
- Can be installed as an npm command: if you run `npm install -g rgbquant-sms`, you can call it anywhere as `rgbquant-sms`.
  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2022
  • Posts: 7
Reply with quote
Post Posted: Fri Aug 18, 2023 9:40 am
I downloaded and ran the demo locally, but it just throws loads of errors in the console. Am I missing something? Do you have a working online demo? Is the zip just missing jquery-2.0.3.min.js?

"Source map error: Error: NetworkError when attempting to fetch resource.
Resource URL: file:///Users/andy/Downloads/RgbQuant-SMS.js-master/demo/js/jquery-2.0.3.min.js
Source Map URL: jquery-2.0.3.min.map"

Uncaught DOMException: The operation is insecure.
getImageData file:///Users/andy/Downloads/RgbQuant-SMS.js-master/src/rgbquant.js:929
toRgbImage file:///Users/andy/Downloads/RgbQuant-SMS.js-master/src/rgbquant.js:725
sample file:///Users/andy/Downloads/RgbQuant-SMS.js-master/src/rgbquant-sms.js:42
process file:///Users/andy/Downloads/RgbQuant-SMS.js-master/demo/js/demo.js:107
mark file:///Users/andy/Downloads/RgbQuant-SMS.js-master/demo/js/timer.js:19
process file:///Users/andy/Downloads/RgbQuant-SMS.js-master/demo/js/demo.js:106

etc etc.

Sorry if I'm missing something obvious here.
  View user's profile Send private message
  • Joined: 25 Feb 2006
  • Posts: 874
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Fri Aug 18, 2023 9:56 am
rotherss wrote
I downloaded and ran the demo locally, but it just throws loads of errors in the console. Am I missing something? Do you have a working online demo? Is the zip just missing jquery-2.0.3.min.js?

"Source map error: Error: NetworkError when attempting to fetch resource.
Resource URL: file:///Users/andy/Downloads/RgbQuant-SMS.js-master/demo/js/jquery-2.0.3.min.js
Source Map URL: jquery-2.0.3.min.map"

Uncaught DOMException: The operation is insecure.
getImageData file:///Users/andy/Downloads/RgbQuant-SMS.js-master/src/rgbquant.js:929
toRgbImage file:///Users/andy/Downloads/RgbQuant-SMS.js-master/src/rgbquant.js:725
sample file:///Users/andy/Downloads/RgbQuant-SMS.js-master/src/rgbquant-sms.js:42
process file:///Users/andy/Downloads/RgbQuant-SMS.js-master/demo/js/demo.js:107
mark file:///Users/andy/Downloads/RgbQuant-SMS.js-master/demo/js/timer.js:19
process file:///Users/andy/Downloads/RgbQuant-SMS.js-master/demo/js/demo.js:106

etc etc.

Sorry if I'm missing something obvious here.


Yes, when you directly access a local HTML file, the web browser blocks a bunch of functionalities, for security reasons; it does not even allow reading the pixels of an image, when the page is run that way..

If you really want to run the demo locally, you would have to set up a local web server, then access the demo through that.
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 874
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Sat Aug 19, 2023 11:11 am
Version 0.2.2 is optimized to run faster and use much less RAM if using a single palette.
  View user's profile Send private message Visit poster's website
Reply to topic Goto page Previous  1, 2



Back to the top of this page

Back to SMS Power!