1. palette remap
- Posted by Jiri Babor <J.Babor at GNS.CRI.NZ> Mar 02, 1999
- 471 views
Guys, I have a bitmap (a photo) that uses almost all 256 available colors. I want to use 64 colors for something else. How do I remap existing 256 colors into just 192 with a minimal distortion? I would prefer Euphoric solution to expensive commercial packages. Anybody with a ready-made function? Pete, Colin? Thanks jiri.
2. Re: palette remap
- Posted by Aen Aen <Fist1000 at AOL.COM> Mar 02, 1999
- 432 views
--part0_920352099_boundary Content-ID: <0_920352099 at inet_out.mail.aol.com.1> Content-type: text/plain; charset=US-ASCII Here's a utility I nabbed off of X2FTP long ago. It comes with full C++ source even. Hope it's of use to you. :) - aen --part0_920352099_boundary Content-ID: <0_920352099 at inet_out.mail.aol.com.2> Content-type: application/zip; name="PALRED.ZIP"
3. Re: palette remap
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Mar 02, 1999
- 432 views
>I have a bitmap (a photo) that uses almost all 256 available colors. I >want to use 64 colors for something else. How do I remap existing 256 >colors into just 192 with a minimal distortion? I would prefer >Euphoric solution to expensive commercial packages. Anybody with a >ready-made function? Pete, Colin? Thanks jiri. You can steal 'Neal' matching function, jiri. Its in there somewhere. It just matches the colors of a bitmap to the best match with the current palette, without altering that palette. But you will problely be able to use it in that way. Also Lucius Hilley ones made a library with all kinds of palette routines, it should be somewhere on the archives. And you could off course just go 'true color' Ralf
4. Re: palette remap
- Posted by Liquid-Nitrogen Software <nitrogen_069 at HOTMAIL.COM> Mar 02, 1999
- 446 views
you can use paint shop pro. it allows you to reduce the color depth to X colors and that'll save space for the 64 colors you need. i don't know about the newest version of psp, but version 3.x can do it.
5. Re: palette remap
- Posted by Colin Taylor <cetaylor at COMPUSERVE.COM> Mar 02, 1999
- 437 views
Message text written by Jiri >I have a bitmap (a photo) that uses almost all 256 available colors. I want to use 64 colors for something else. How do I remap existing 256 colors into just 192 with a minimal distortion? I would prefer Euphoric solution to expensive commercial packages. Anybody with a ready-made function? Pete, Colin? Thanks jiri. < Good morning. In my recent palette utilities package there is a routine called systemize_image(). You can apply your 64 color palete to the imag= e as a system palette. Your system palette will occupy the first 64 colors= of the new palette. This routine has the advantage that it will try to u= se the new system colors in the image as well as the remaining 192 colors, thus minimising color distortion. You can further reduce distortion by next dithering the old image/old palette to the new systemized palette. Colin
6. Re: palette remap
- Posted by jiri babor <jbabor at PARADISE.NET.NZ> Mar 03, 1999
- 436 views
Thanks, guys. Massive! (Obnoxious exclamation one of my sons loves to irritate me with...) Aen wrote: >Here's a utility I nabbed off of X2FTP long ago. It comes with full C++ source >even. Hope it's of use to you. :) Intriguing piece of software. And very clever, judging from the supplied examples. But it does not quite suit me, it seems to require full screen image (320x200x256 pcx). I might finish translating it into Euphoria... Ralf wrote: >You can steal 'Neal' matching function, jiri. It's Neil, Ralf. For a guy who is very particular about spelling of his own name you are pretty cavalier when dealing with anybody else's names... Seriously, I had a quick look through many of Pete's files, but I could not find just the right thing. Thanks, Ralf. Lucius wrote: >These are some routines that I wrote. Maybe they will help. >In the mean time I will be working on a palette resizing routine. Well, they don't. But keep working on that palette resizing routine. That's what I really need. Btw, do you want to take the translation job I mentioned above off my hands? You could do much worse than that. Thanks anyway. Mark wrote: >you can use paint shop pro. That's what I tried. But my trial copy expired many moons ago. Another of my sons has a legal copy of the latest (bloated) PSP, but he would not share it with me, because HE paid for it (my wife keeps telling me *I am* responsible for their upbringing!). -Thanks, Mark, I am just downloading another trial copy, all 5 or 6 Mbytes of it... jiri
7. Re: palette remap
- Posted by jiri babor <jbabor at PARADISE.NET.NZ> Mar 03, 1999
- 425 views
Colin Taylor wrote: >Good morning. In my recent palette utilities package there is a routine >called systemize_image(). You can apply your 64 color palete to the image >as a system palette. Your system palette will occupy the first 64 colors >of the new palette. This routine has the advantage that it will try to use >the new system colors in the image as well as the remaining 192 colors, >thus minimising color distortion. You can further reduce distortion by >next dithering the old image/old palette to the new systemized palette. Good morning, indeed. It's 3.30 am here in Kiwiland, and I have to go to work in just a few hours... Colin, I had a good look at your pal_util.e and somehow still managed to miss the routine. It will probably do what I want, but I am not quite sure about the meaning of the 'exact' flag. (Most likely it will have to be set to zero, because the first 64 colors will be continually changing?) Thanks jiri
8. Re: palette remap
- Posted by Colin Taylor <cetaylor at COMPUSERVE.COM> Mar 02, 1999
- 431 views
Message text written by Jiri >I am not quite sure about the meaning of the 'exact' flag.< In the systemize_image() routine the 'exact' flag works like this: exact=3D0 - the image palette is re-arranged so that you have somethi= ng resembling the system palette at the beginning (meaning that the image wi= ll have *no* color distortion but the system palette may have color distortion) exact=3D1 - the exact system palette is preserved (possibly causing s= ome color distortion in the image) You should do the following: <code> new_image =3D systemize_image(sys_palette, old_image, 1) new_image =3D dither_image(new_image[1], old_image) </code> However... if you will be changing the system colors this won't work for= you. Let me give it some more thought. Colin Taylor
9. Re: palette remap
- Posted by Lucius Hilley III <lhilley at CDC.NET> Mar 02, 1999
- 461 views
Thank you Ralf, I believe it is labeled Hilley's Utilities at the Archives. On Tue, 2 Mar 1999 08:29:51 +0100, Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> wrote: >>I have a bitmap (a photo) that uses almost all 256 available colors. I >>want to use 64 colors for something else. How do I remap existing 256 >>colors into just 192 with a minimal distortion? I would prefer >>Euphoric solution to expensive commercial packages. Anybody with a >>ready-made function? Pete, Colin? Thanks jiri. > >You can steal 'Neal' matching function, jiri. >Its in there somewhere. It just matches the colors of a bitmap to the best match with the current palette, without altering that >palette. >But you will problely be able to use it in that way. Also Lucius Hilley ones made a library with all kinds of palette routines, >it should be somewhere on the archives. > >And you could off course just go 'true color' > >Ralf
10. Re: palette remap
- Posted by Pete Eberlein <xseal at HARBORSIDE.COM> Mar 02, 1999
- 433 views
> >You can steal 'Neal' matching function, jiri. > > It's Neil, Ralf. For a guy who is very particular about spelling of his > own name you are pretty cavalier when dealing with anybody else's > names... Neil is just the code name.. it doesn't really matter. People can spell it however they want.. (and they do! Niel,Neal) > Seriously, I had a quick look through many of Pete's files, but I could > not find just the right thing. Thanks, Ralf. Yeah, well Neil wasn't written with palette reduction specifically in mind.. but I did manage to cobble together a program that does the trick. It also forced me to write the save_bitmap8 routine for 256-color images. While you're there, warp your mind with a wormhole tunnel effect: Later, _______ ______ _______ ______ [ _ \[ _ ][ _ _ ][ _ ] [/| [_] |[/| [_\][/ | | \][/| [_\] | ___/ | _] | | | _] [\| [/] [\| [_/] [\| |/] [\| [_/] [_____] [______] [_____] [______] xseal at harborside.com ICQ:13466657 http://www.harborside.com/home/x/xseal/euphoria/
11. Re: palette remap
- Posted by Robert Craig <rds at ATTCANADA.NET> Mar 02, 1999
- 426 views
To Aen Aen: A 233K attachment is excessive for this list. While a few people may have been happy to receive it, a couple of hundred others were probably very annoyed at the extra time (and money) they were forced to spend downloading it. It would have been better to send it privately, post a link to it, or simply describe where to find it on the Internet. Regards, Rob Craig Rapid Deployment Software http://members.aol.com/FilesEu/
12. Re: palette remap
- Posted by Jiri Babor <J.Babor at GNS.CRI.NZ> Mar 03, 1999
- 437 views
>Neil is just the code name.. it doesn't really matter. People can spell >it however they want.. (and they do! Niel,Neal) Magnanimous gesture! >Yeah, well Neil wasn't written with palette reduction specifically in >mind.. but I did manage to cobble together a program that does the trick. >It also forced me to write the save_bitmap8 routine for 256-color images. Thanks, Pete. I have not been able to test it yet, because none of the NT machines at work can handle Neil, but just looking at it I am pretty sure it will work. jiri
13. Re: palette remap
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Mar 03, 1999
- 453 views
>Yeah, well Neil wasn't written with palette reduction specifically in >mind.. but I did manage to cobble together a program that does the trick. >It also forced me to write the save_bitmap8 routine for 256-color images. Pete, I noticed you updated *Neil* (yes, spelled correctly) with font-routines, and save-bitmap routines, however.. I noticed that the save_bitmap8 routine will not work with images containing #RRGGBB pixels, and that save_bitmap24 will not work with imaging using palette indexes. Couldnt there at least be some 'generic' function that selected the best method for saving ? I was wondering as well, why wouldnt both routines be able to save images using either heximal or indexed pixel format ? And now we're on the topic, (and since you've written it anyway already) couldnt your 'reduce-palette' be included in Neil as a procedure to say 'Free' this many palette entries and in true color mode it is simply 'does' nothing, something like 'free_palette (38)' .. frees 38 palette entries >While you're there, warp your mind with a wormhole tunnel effect: What have you been on ? No.. just joking. Very cool effect Ralf