Datatype Color Quantizing

miker1264 · 4331

OlafS3

  • Legendary Member
  • *****
    • Posts: 544
    • Karma: +50/-8
Reply #15 on: December 07, 2021, 05:48:11 AM
This is the x86_64 64bit version of DT2GIF.

This commandline app converts picture files (8,24,32bit) to 8bit GIF files with Neuquant Algorithm.

and where is 68k?  8)



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #16 on: December 07, 2021, 07:40:51 AM
The 68k version will be available within an hour. It's untested.

I suppose the old saying is true? "You give them new toys and what happens? They break them!"

Now I have to make it idiot proof in case someone forgets to enter a filename!  :P

But does it work with input and output filenames? Just curious.



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #17 on: December 07, 2021, 07:55:45 AM

Now I have to make it idiot proof in case someone forgets to enter a filename!  :P


You are referring to the error mentioned in the previous post, I confirm that it also happens with Icaros and Nightly Build, but strange that the error comes out when you start DT2GIF without any parameter!


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #18 on: December 07, 2021, 09:06:41 AM
AMIGASYSTEM

LOL. It's not strange at all. The program doesn't check for empty filenames! Shame on me. So it tries to pass a NULL string.

That's very bad. I will fix that soon. But be advised the 68k version is the same as x86. Please always enter InputFile & OutputFile to avoid error.  ;)

Or at least do that till I can fix it to make it check for NULL strings.It works on AROS 68k to Quantize 24bit JPEG to 8bit GIF.



miker1264

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



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #20 on: December 07, 2021, 09:58:58 AM

That's very bad. I will fix that soon. But be advised the 68k version is the same as x86. Please always enter InputFile & OutputFile to avoid error.  ;)


No problem, I set DT2GIF to Dopus4 where you are obliged to add the filename of the dstination file :)


Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #21 on: December 07, 2021, 10:13:16 AM
miker i have upload DT2Gif on Archives, all version

ps. i uploading also the new datatype for m68k and x64, the x86 version missed
« Last Edit: December 07, 2021, 10:20:17 AM by salvo »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #22 on: December 07, 2021, 10:23:04 AM
salvo

It's not ready yet. Please remove it till I release the next version. I have to fix the text strings. But Im busy at the moment.

Later today I will post all versions and the source code for all to use and enjoy. For developers for AROS & Amiga the Neuquant code will be especially interesting for color quantizing.

I just updated it to test for NULL strings when filenames are empty otherwise it will crash because of NULL strings. Though average users don't normally omit the filenames. Not usually.

Also please remove the 68k datatypes that were posted last time around. I'll post new 68k datatypes here soon. Thanks.  :)
« Last Edit: December 07, 2021, 10:47:29 AM by miker1264 »



Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #23 on: December 07, 2021, 10:33:31 AM
ok sorry



OlafS3

  • Legendary Member
  • *****
    • Posts: 544
    • Karma: +50/-8
Reply #24 on: December 07, 2021, 10:45:19 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



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #25 on: December 07, 2021, 10:54:07 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.




miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #26 on: December 07, 2021, 11:15:23 AM
Problem resolved. Now it will test for NULL string when the user omits the filenames.

See screenshot. I will recompile and post new binaries as well as source files soon.  :)



OlafS3

  • Legendary Member
  • *****
    • Posts: 544
    • Karma: +50/-8
Reply #27 on: December 07, 2021, 11:30:21 AM
one idea...

if user only supplies the source why not use the name of the file and directory and only replace ending with gif?



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #28 on: December 07, 2021, 11:35:00 AM
one idea...

if user only supplies the source why not use the name of the file and directory and only replace ending with gif?

Good idea for the next update. Here is a zip file containing all the binaries and souce files.

In the next update if you only enter one filename it will copy it to output filename then remove the file ext and add "_nq8.gif" to it. The new output filename will be listed in the "OUTFILE:" string.

Ok. @salvo now you can upload these if you'd like. Thanks for your help.  :)
« Last Edit: December 07, 2021, 11:45:41 AM by miker1264 »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #29 on: December 07, 2021, 12:12:08 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.