-
How to recolor 16 color image to other 16 color palette?
Hi!
I'm newbie here and in graphics too.
I'm working with graphics for retro computers.
I have images in 16 color 'near' CGA palette.
I need to recolor it to similar 16 color also 'near' CGA palette.
Reason is simple - rendering tool for transfering images requires exact color to produce single color filled parts - if color doesn't match it uses Floyd Steinberg dithering to create as near as possible color.
But when images with resolution 256x192 are converted to 480x360 is not enough space for dithering and it's high quality loss. Of course there are also typical retro computer color cells - in one color cell 8x1 pixel - so in 8 pixels horizontally - can be 2 colors only. It's for 4-bit colors - one color for low nibble and one color for high nibble = 8 bits = 8 pixels wide.
So, best result I can have by recoloring image from one to 2nd color palette. Both palettes are high similar, so I mean (here's I'm not sure) that there can be created tolerance limit when recoloring...
Qs is nothing more nothing less than: How to recolor images from one to 2nd color palette? I need help 'cause I'm beginner.
I found this forum 'cause on two other forums I got answer: So, why you want to do it?...
So, I hope that anybody helps me.
Thank you all for all.
Miro
-
Re: How to recolor 16 color image to other 16 color palette?
Welcome to TalkGraphics
I am not sure how this wold be done. We have come so far and 16 color. 32, 64, and 256 color palettes are archaic.
You should be able to disable dithering in a bitmap editing program.
-
Re: How to recolor 16 color image to other 16 color palette?
Problem with dithering is that I'm not program creator and don't have sources...
I know that low count color palettes are archaic, but look back ~30 years and you will see what were 16 colors...
Miro
-
Re: How to recolor 16 color image to other 16 color palette?
First step would be to create CGA pallette colours and add them to pallette.
Then xara should still have ability to export to 16 colour gif or whatever. Its not a bitmap editor though so its not suitable for editing bitmaps.
-
Re: How to recolor 16 color image to other 16 color palette?
I'm not clear on what you are doing - neither 256 x 192 nor 480 x 360 are standard CGA resolutions, but other resolutions were used
are you emulating CGA graphics on a modern computer?
I have no idea what a 'near' CGA palette is - details of the IBM CGA standard are outlined here: http://cs.mcgill.ca/~rwest/wikispeed...cs_Adapter.htm
if you are emulating then you can use a bitmap editor [eg photoshop in index color mode] to change the palette - but depending on the program you may not be able to save/export this below 256 colours, in which case as sculptex said, you can import, then export that way from xara [but you can't edit the bitmap palette in xara just reduce it down]
-
2 Attachment(s)
Re: How to recolor 16 color image to other 16 color palette?
What kind of images are the original images and did you draw those with palette limitations in mind, or converting existing images?
Reducing palette to 16 freely selected colours is easy but when working with fixed palette you really need dithering to have decent results, as without different shades of colour it must be done by dithering. When you have nice 16 colour image with optimum palette and then just swap the palette to CGA one, your image will be rainbow coloured mess if there is any shading.
Even with just CGA colour palette without any other limitations, I would actually decrease colour depth to 2bit, or even 1 bit and after that convert back to 4bit and swap the palette. For dithering when decreasing the colour depth can experiment with FS or ordered and then pick one that gives more suitable image, then use no dithering when converting image back to 4bit colour for the full CGA palette.
Attachment 117785
Attachment 117784
-
Re: How to recolor 16 color image to other 16 color palette?
Ok, here's explain:
Source image is ZX Spectrum bitmap. ZXS has 15 color palette (black has only one level). Colors are very similar to CGA colors (I mean full 16 color palette). I need not to emulate CGA.
These sources I need to convert to Commodore 128 VDC color palette - again very similar colors like CGA. For best results I need to match exact color - it removes dithering.
You can now see that in 15 and 16 color palettes is dithering not required - I need convert one palette to second - I need not similar colors, I need exact match to avoid dithering.
I'm creating ZX Spectrum emulator for Commodore 128. So, when is anything emulated it needs to look like original - and dithering looks different to original.
If you will need I upload palettes.
Miro
-
Re: How to recolor 16 color image to other 16 color palette?
it sounds like you should be able to do that in a bitmap editor that handles index tables - if you want to post up the palettes and a source image I can run it through photoshop to test for you
-
5 Attachment(s)
Re: How to recolor 16 color image to other 16 color palette?
Ok, I'm very thankful.
Source palette:
Attachment 117805
Target palette:
Attachment 117806
Example:
Attachment 117807
Original image:
Attachment 117809
Converted image:
Attachment 117808
Miro
-
Re: How to recolor 16 color image to other 16 color palette?
you want the original image recolored with the target palette?
-
Re: How to recolor 16 color image to other 16 color palette?
that original image you posted it is not a 16 color 4bit image - it is 24bit colour
if you posted up a 4bit image it may be that forum converted it and you can try reposting a zipped image
if you are happy to have the color palette reduced to 4bit in photoshop, I can do that before I recolor, but a 4bit image source would be better
-
2 Attachment(s)
Re: How to recolor 16 color image to other 16 color palette?
Yes, 'cause here's conversion result:
Original:
Attachment 117810
Result:
Attachment 117811
Miro
-
Re: How to recolor 16 color image to other 16 color palette?
I'm sorry for not true 4-bit images, these examples are taken from emulator.
I will post in few moments 4-bits.
Miro
-
4 Attachment(s)
Re: How to recolor 16 color image to other 16 color palette?
Here are true 4-bit images and palettes:
source palette:
Attachment 117812
target palette:
Attachment 117813
original 1:
Attachment 117814
original 2:
Attachment 117815
Miro
-
Re: How to recolor 16 color image to other 16 color palette?
thanks - not sure how long it will take....
-
1 Attachment(s)
Re: How to recolor 16 color image to other 16 color palette?
ok this has been changed - it only uses 8 of the 16 colors which is extra work actually probably not...
but overall this is a lot of work, but if this is ok then you know it can be done
Attachment 117819
-
Re: How to recolor 16 color image to other 16 color palette?
Thank you very much!
Result is better, but not best... maybe it is for destination palette.
I contacted author of renderer and he got me full destination palette in color values:
{ 0, 0, 0}, /* Black */
{ 85, 85, 85}, /* Gray */
{ 0, 0, 170}, /* Blue */
{ 85, 85, 255}, /* Light Blue */
{ 0, 170, 0}, /* Green */
{ 85, 255, 85}, /* Light Green */
{ 0, 170, 170}, /* Cyan */
{ 85, 255, 255}, /* Light Cyan */
{170, 0, 0}, /* Red */
{255, 85, 85}, /* Light Red */
{170, 0, 170}, /* Magenta */
{255, 85, 255}, /* Light Magenta */
{170, 85, 0}, /* Brown */
{255, 255, 85}, /* Yellow */
{170, 170, 170}, /* Light Gray */
{255, 255, 255}, /* White */
If I can ask... Try you to adapt, or better give me instructions how to do it and what a software I need?
Thank you for all.
Miro
-
1 Attachment(s)
Re: How to recolor 16 color image to other 16 color palette?
should be more accurate with the defined values:
Attachment 117822
-
1 Attachment(s)
Re: How to recolor 16 color image to other 16 color palette?
I took palette file from a ZX Spectrum emulator and modified it to use colour values from this thread and saved it as CGApalette. Now all that needs to be done is select 4bit colour , no dithering and the CGApalette to get image converted to those colours.
Using the image on page 1 of this thread gives me this:
Attachment 117823
-
4 Attachment(s)
Re: How to recolor 16 color image to other 16 color palette?
As for what is involved:
you open the file and then you open it's palette to edit - you [double]click on each color in turn, to open the color dialog and change it's vaue to the one you want to replace it with
I found it far easier to do this in Corel PaintShopPro X9 than Photoshop, but my Photoshop is old and changing palettes is, to say the least, more work than it should be - PSP X9 was straight forward in comparision [but photshop CC may be ok, I don't know]
another thing - there is one noticable difference in the new palette: it has a 'brown' color in place of an 'olive-greenish' one and in the case of the Fist image that may mean the background no longer looks right, but that is something you may have to live with...
quick run down of the steps in PSP X9 [wich has a thirty day free trial]:
open the program and make sure you are in edit tab, and close any image that opens by default - open the image you want to edit - then go to menu: image/palette/edit palette
Attachment 117825
this will open the edit palette dialog and you will see the current value of the selected color shown on the right - to edit double click the color and that will open the color editor, once there make sure you are on it's slider tab, and rgb sliders is set in the drop down menu above the sliders
Attachment 117826
you can now enter the new values in the boxes at the end of the sliders - which colour you select is your choice, they will not always be in the same order, and some images may have few colors - you need to refer to the original value in each case and select the most appropriate new one - eg:
Attachment 117827
click ok - and the edit palette dialog will now show the new value for that color:
Attachment 117828
when your done click ok to leave the edit palette dialog
...
at this point you may be thinking 'I wish there was an easier way' - and so am I :( - but I know of no automated system that is going to able to cope, unless you want to use some thing like imagemagick, which means using command line and programming and I understand is capable of changing 255-251-0 to 255-255-85 regardless the position in the table, but it's out of my experience - anyway you may want flexibility in which of the new palette colors you choose
so good luck with this - I enjoyed playing with it, don't get to use PSP much these days...
-
2 Attachment(s)
Re: How to recolor 16 color image to other 16 color palette?
Quote:
Originally Posted by
theinonen
I took palette file from a ZX Spectrum emulator and modified it to use colour values from this thread and saved it as CGApalette. Now all that needs to be done is select 4bit colour , no dithering and the CGApalette to get image converted to those colours.
Using the image on page 1 of this thread gives me this:
Attachment 117823
I tried that and what I got was this:
Attachment 117829
Attachment 117830
maybe I did something wrong?
how exactly did you do it? - how did you map the colors?
-
Re: How to recolor 16 color image to other 16 color palette?
Thank you for explanation.
How I got image and rendered to final?
Image is taken from MiST FPGA with SoC ZX Spectrum with ULA graphic chip, then converted by renderer made for Commodore 128 VDC chip - rendering at moment when find not exact color, runs dithering, it has no command line options. I got source from author, it's written in C. Sadly for now I know programming of PCs only Visual Basic, began C++... so any time will go to moment when I will re-programming source.
Sadly in PC world is assembler full of routines which can be written in other PL, I know assembler of 8-bit and 16-bit computers, but in this era is assembler something what no everybody knows its low level...
But thank you for clearing me it and I will search for free tool which it can do at least like Corel or ? better ?.
Miro
-
Re: How to recolor 16 color image to other 16 color palette?
Quote:
Originally Posted by
handrawn
I used DPScan for the palette swapping and as there are both RISC OS and Windows versions of the software, I could experiment with using palette file inside application folder of ZX Spectrum emulator on RISC OS. With that palette file inserted inside DPScan palette directory, it converted images with perfect ZX Spectrum colours and after that it was just manual work for replacing colours inside that palette with new values from this thread and saving palette with different name to same directory.
I tried earlier to make my own palette from scratch and it gave wrong colours in wrong places, but taking colour order from that existing palette just works and only need select palette and press button for correct looking replacement colours for the image.
-
Re: How to recolor 16 color image to other 16 color palette?
sounds interesting if you have access to both RISC OS and windows [which I don't] - but can you guarantee than it will replace the right colors in the right place for other images just by pressing button, or will there still be the manual work to do in each case? - can you try it with the 'Fist' image?
-
1 Attachment(s)
Re: How to recolor 16 color image to other 16 color palette?
Here is the "fist" image after press button palette swap.
Attachment 117835
I am pretty sure it works perfectly for ZX Spectrum images because the palettes are so similar and at least on my tests the resulting images look good.
-
Re: How to recolor 16 color image to other 16 color palette?
thanks - so can you do this if you do not have access to risc - if so can you post up the palette, because I would love to give that a test :)
-
Re: How to recolor 16 color image to other 16 color palette?
Actually the palette imported from your images works fine with the software I used, and the colours from the ZX Spectrum palette get swapped to equal colours from another palette.
DPScan is freely downloadable graphics utility on RISC OS, but on Windows it only comes free with Windows version of Ovation Pro DTP software. Palette files it exports/imports are RISC OS palette files and as such may not be much use for Windows users without DPScan. Anyway your palette works already as intended and it seems DPScan is just pretty good at substituting colours to closest colour on another palette.
-
Re: How to recolor 16 color image to other 16 color palette?
Nice!
Boys you're great!
I try to do it by DPScan, if it will be successful I'll report.
Miro
-
Re: How to recolor 16 color image to other 16 color palette?
Sadly download not found :(
Miro
-
Re: How to recolor 16 color image to other 16 color palette?
DPScan download link listed here: http://www.davidpilling.info/cd/software.html
manual here: http://www.davidpilling.info/cd/Davi...can/DPScan.pdf - also listed on previous link
seems to work ok on my win 10 x64 - do need to be in admin mode to install it, ie run installer as admin
quite a useful utility :)
it may only work under trial mode though if you have not bought ovation pro - ie it may stop working after a while - seems to be no clear info on this that I could find...
edit - at the bottom of the above linked page:
Quote:
Note DPScan cannot be used unless Ovation Pro is registered
so make of that what you will.....
-
Re: How to recolor 16 color image to other 16 color palette?
Quote:
Originally Posted by
MIRKOSOFT
Hi!
I'm newbie here and in graphics too.
I'm working with graphics for retro computers.
I have images in 16 color 'near' CGA palette.
I need to recolor it to similar 16 color also 'near' CGA palette.
Reason is simple - rendering tool for transfering images requires exact color to produce single color filled parts - if color doesn't match it uses Floyd Steinberg dithering to create as near as possible color.
But when images with resolution 256x192 are converted to 480x360 is not enough space for dithering and it's high quality loss. Of course there are also typical retro computer color cells - in one color cell 8x1 pixel - so in 8 pixels horizontally - can be 2 colors only. It's for 4-bit colors - one color for low nibble and one color for high nibble = 8 bits = 8 pixels wide.
So, best result I can have by recoloring image from one to 2nd color palette. Both palettes are high similar, so I mean (here's I'm not sure) that there can be created tolerance limit when recoloring...
Qs is nothing more nothing less than: How to recolor images from one to 2nd color palette? I need help 'cause I'm beginner.
I found this forum 'cause on two other forums I got answer: So, why you want to do it?...
So, I hope that anybody helps me.
Thank you all for all.
Miro
Miro,
You are in way over my head but I think I can offer some ideas here. First of all, if you have access to AI, they have a 16 color bitmap tracer that may make the whole process a little easier.
If you will trace it and then "expand" the image, you should be able to "re-color" the artwork without too much trouble. I'm sure you could "re-assign" colors in the palette but I don't know HOW this is done.
Hope this helps...
Mark:)
-
Re: How to recolor 16 color image to other 16 color palette?
if you have a means to edit the bitmap palette then tracing it is an extra step you don't need; you'd still need to change the colors anyway, and then convert back to bitmap...