Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Converting 24-Bit images to Paletted Images (2-colors to 256-colors)
#5
(11-22-2025, 05:42 PM)SMcNeill Wrote: @ahenry3068 Notice that we have two modes you  can choose from for default.
256 uses the QB64PE  built in palette.
257  does as you suggest and uses an adaptive palette for whatever best suits the image itself.

You can see the difference with the  demo code above.

The main advantage to using the 256 color code is you *know* what each color is in your palette.  Such as COLOR 40  is bright red.  With an adaptive palette,  the colors are whatever is best for the image, but not set to our existing scheme, so you may not be displaying the colors  you expect with any text or whatnot which you use with that image.
   I get all this Steve.  Thank ya.   But I still think ImageMagick does a better job than the builtin Adaptive palette.  (which isn't actually bad !) 

   Another reason to roll your own routine would be to map a whole bunch of images to an existing palette when porting from another platform too !

   Probably the built in options cover a lot of use cases.   But there are still reasons to *Roll your own code here !*
Reply


Messages In This Thread
RE: Converting 24-Bit images to Paletted Images (2-colors to 256-colors) - by ahenry3068 - 11-22-2025, 06:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Bright Circle Colors SierraKen 4 626 08-23-2025, 03:33 PM
Last Post: DANILIN
  A little bit of spark fun today TerryRitchie 2 845 05-18-2024, 12:59 AM
Last Post: bobalooie
  _ROL & _ROR A quickie bit of crypto OldMoses 0 525 09-05-2022, 09:36 PM
Last Post: OldMoses
  Load Image 256 Petr 1 756 05-22-2022, 06:19 PM
Last Post: Dav
Video QB64 Win32 Video Player (64 bit) SpriggsySpriggs 6 1,548 04-24-2022, 05:33 PM
Last Post: Dav

Forum Jump:


Users browsing this thread: 1 Guest(s)