Datatype Color Quantizing

miker1264 · 4324

miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #30 on: December 07, 2021, 01:32:15 PM

Thanx..,. the result looks good  :D only 256 colours? Nice algorithmen

GIF is a format that can have a maximum of 256 Colors and it is not possible to have more.
I must say that the conversion is exceptional, the images appear to have more than 256 Colors.

That's the desired effect. The "wow" factor. Neuquant is a very good algorithm for color quantizing. On other platforms such as Windows or Linux the algorithm is much slower and so many programmers choose not to use it. But on AROS it's very fast.




ilBarbax

  • Newbie
  • *
    • Posts: 14
    • Karma: +2/-0
Reply #31 on: December 08, 2021, 02:46:10 AM
Here is the AROS 68k version. I say 'AROS' so don't try using it on Amiga OS3 then report an error.  ;)

Thanx..,. the result looks good  :D only 256 colours? Nice algorithmen

And for me no problem either. It is integrated in my environment, user cannot make mistakes there  :D

The output quality of the Neuquant Algorithm (strange name I know) is exceptionally good considering it's only 256 colors.

It's a little more cpu intensive than other quantizers. I'd estimate for an 800x600 image it takes 500 milliseconds up to a full second to process. For a normal image to save by datatype it only takes 100 to 300 milliseconds. It seems a little slower on 68k for some reason.

Imagine the quality of IFF Icons derived from 32bit PNG images using this algorithm. I'm planning a small app caalled PNG2Icon.

hi Mike
While you are taking over to your png2icom program can you please review your icon2iff as well to correct the issue on converting icons with only one icon status.
Thanks



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #32 on: December 08, 2021, 02:49:09 AM
Here is the AROS 68k version. I say 'AROS' so don't try using it on Amiga OS3 then report an error.  ;)

Thanx..,. the result looks good  :D only 256 colours? Nice algorithmen

And for me no problem either. It is integrated in my environment, user cannot make mistakes there  :D

The output quality of the Neuquant Algorithm (strange name I know) is exceptionally good considering it's only 256 colors.

It's a little more cpu intensive than other quantizers. I'd estimate for an 800x600 image it takes 500 milliseconds up to a full second to process. For a normal image to save by datatype it only takes 100 to 300 milliseconds. It seems a little slower on 68k for some reason.

Imagine the quality of IFF Icons derived from 32bit PNG images using this algorithm. I'm planning a small app caalled PNG2Icon.

hi Mike
While you are taking over to your png2icom program can you please review your icon2iff as well to correct the issue on converting icons with only one icon status.
Thanks

Yes. Of course. I had forgotten about that.

I will revise it within the next few days and post it on a separate thread.




miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #33 on: December 08, 2021, 02:51:13 AM
It took a full one second for Neuquant to Quantize the Tutankhamum-Mask to GIF.

But it looks extremely good. It certainly looks like there are many more than 256 colors.

Neuquant Algorithm can also be used to Quantize 32bit and 24bit images to ILBM with 5,6,7,8 bitplanes.



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #34 on: December 08, 2021, 03:26:07 AM
Yes indeed it is perfect seems to have many more colors  :)

Thanks Miker for new software, DTConv now works fine with my fonts even if enlarging it a bit more would look better (see screenshot).

Rigurada Multiview the resize is not yet active on this version, it doesn't work for me.

I recreated a MysticView icon for AROS One x86/68k and in Dual-PNG with Glow for Icaros that I attach for those who want to use it.

EDIT:

I changed the file format, Zip-compressed the Icons Multiview because the forum converted them a PNG image, now there are also icons for those who use AROS One x86/68k :)
« Last Edit: December 08, 2021, 03:50:52 AM by AMIGASYSTEM »



OlafS3

  • Legendary Member
  • *****
    • Posts: 544
    • Karma: +50/-8
Reply #35 on: December 08, 2021, 05:32:24 AM
It took a full one second for Neuquant to Quantize the Tutankhamum-Mask to GIF.

But it looks extremely good. It certainly looks like there are many more than 256 colors.

Neuquant Algorithm can also be used to Quantize 32bit and 24bit images to ILBM with 5,6,7,8 bitplanes.

if it needs one second to convert or 500 ms is not really important for the user

Thanks Miker



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #36 on: December 08, 2021, 09:44:49 AM
AMIGASYSTEM

Does AROS One x86 v1.6 use the same font type & size as v1.7 ?

I will revise & test DTConvertGUI there.

It seems that is already based on font size but the left/top offsets are not consistent. AROS 68k seems to compensate.

The skewed string gadgets only happens on x86. I'll fix it.
« Last Edit: December 08, 2021, 11:51:44 AM by miker1264 »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #37 on: December 08, 2021, 01:00:26 PM
Does AROS One x86 v1.6 use the same font type & size as v1.7 ?


I will revise & test DTConvertGUI there.

It seems that is already based on font size but the left/top offsets are not consistent. AROS 68k seems to compensate.

Both AROS One x86 and AROS One 68k use the "Arial" font (see screenshot) which is a "spaced" font a bit "longer" than many others but nicer to look at, I also use it on Dopus4 and AfA One.
« Last Edit: December 08, 2021, 02:38:54 PM by AMIGASYSTEM »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #38 on: December 08, 2021, 02:00:31 PM
Since the Neuquant Algorithm works so well we should find appropriate uses for it to quantize 32bit images (icons) to 8bit.

Here's the problem:
On AROS 68k the system only supports Classic OS35 Icons. Not 32bit PNG Icons as on AROS x86 and x86_64. So we need OS35 Icons (Glow Icons) to use on 68k. But most OS35 icons are of very poor quality having only 5bitplanes = 32 colors. It's a legacy from the Old Amiga Days. So we need better OS35 icons.

Here's the solution:
ConvertIcon will be a commandline app that will directly convert PNG Icons to IFF Icons. It will split the input PNG Icon into two images then quantize them and use the BMHD and Colormap and Indexes to make a Classic OS35 Icon. PNG in = IFF out.  ;)

Not all PNG Icons are suitable for conversion because of loss of transparency when converting 32bit to 8bit. But many will work.


« Last Edit: December 08, 2021, 02:04:07 PM by miker1264 »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #39 on: December 08, 2021, 02:37:53 PM
AROS 68k supports Dual-PNG icons very well, see my AROS One 68k where all the icons are Dual-PNG.

The problem is the Icon.library of AROS 68k that doesn't work as it should, on AROS 68k you have to use the icon.library of Peterk that has created a version of icon.library for AROS 68k.


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #40 on: December 08, 2021, 03:39:50 PM
AROS 68k supports Dual-PNG icons very well, see my AROS One 68k where all the icons are Dual-PNG.

The problem is the Icon.library of AROS 68k that doesn't work as it should, on AROS 68k you have to use the icon.library of Peterk that has created a version of icon.library for AROS 68k.

It's true that you can add third party applications such as PeterK's Icon Library but what about plain vanilla AROS 68K?

Why does it have to look so plain and unadorned? We have no choice but to use Gorilla Icons or change every icon like you do.

Besides that there may be instances where the user wants to use Classic Icons or wants to make Classic Icons for OS3.9.




AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #41 on: December 08, 2021, 04:37:38 PM
AROS 68k must detach itself from Amiga's navel, AROS was born to bring something new, if we have to have an AROS that looks like OS3 we might as well use OS3 directly, I am against imitations, every OS must have its own personality.

After 30 years I personally got tired of seeing prehistoric icons, we have the possibility to have icons that no other OS can have and we don't want to use them.


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #42 on: December 08, 2021, 09:45:19 PM
Who says "ILBM" files can't look good with only 8 bitplanes!?  :P

Here is the next little app in the series...PIC2IFF. It convert 8/24/32 bit pictures to 8bit ILBM.

Hmmm...Now you can open a 32bit PNG and use PIC2IFF to turn it into an 8bit ILBM. Then just make an icon.



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #43 on: December 08, 2021, 09:46:34 PM
Here is the compiled AROS 68k version. Just copy it to the C directory and have fun making iLBM's.



OlafS3

  • Legendary Member
  • *****
    • Posts: 544
    • Karma: +50/-8
Reply #44 on: December 09, 2021, 02:07:05 AM
Here is the compiled AROS 68k version. Just copy it to the C directory and have fun making iLBM's.

Input-File is any image supported by datatypes I assume

Thanks Miker