trouble decreasing colors of gradiant

againsttheflow

unpolitically uncorrect
Joined
Dec 24, 2006
Messages
1,985
Location
northern CA
I was adding a resource to one of Casius Bell's premade civpedia resource .pcx's but not getting satisfied with the result. Upon realizing it was already indexed I increased colors to 16 million pasted and liked the result, after re-indexing though the result was rather disappointing. I had thought that since the colors in the file were at most 256, the re-index process would not lower the quality. I then tried simply increasing the colors and then re-indexing the original, unedited file with the same results. Here is the original file and palette, as far as I can tell the image itself uses only maybe a little over half the palette.



I then reduced to 254 (& 256 to be safe). Neither 'nearest color matching' nor 'error diffusion' cut it.





The obvious question being, can this be prevented? :)

Program: Paint Shop Pro 9
 

Attachments

  • ScreenShot001.jpg
    ScreenShot001.jpg
    32 KB · Views: 123
  • ScreenShot002.jpg
    ScreenShot002.jpg
    30.3 KB · Views: 110
  • ScreenShot003.jpg
    ScreenShot003.jpg
    31 KB · Views: 125
I am not sure why you are having that problem here it is zoomed in to 300% and it still looks clear.
 

Attachments

  • colortable.png
    colortable.png
    45.6 KB · Views: 53
As is so often the case with these things I found part of the solution the second I finished here. I found that when I 'decreased to 256 colors' I was able to obtain the following result using 'optimized octree'.



The problem being that the reason I used 'decrease to X colors' in the first place was to reduce to 254 so as to leave those all important slots at the end. There is no 'optimized octree' option in this box as can be seen above. Not only that, but when using this option on the finished resource image the result was still not quite satisfactory (I'd sooner a little loose a few colors in the resource itself so as to keep the shading right in the background. This may have to be done by simply finding out how many slots would be open in the palette shown in the first image up top ^ and reducing the resource colors to that amount before pasting)

 

Attachments

  • ScreenShot004.jpg
    ScreenShot004.jpg
    30.9 KB · Views: 109
  • ScreenShot005.jpg
    ScreenShot005.jpg
    33.2 KB · Views: 116
Why does the gradient background look like it has vertical bands in it?
I made this real quick.......The png and the pcx look exactly the same in my example.
 

Attachments

  • sugar.png
    sugar.png
    11.6 KB · Views: 53
  • sugar.pcx
    12.5 KB · Views: 31
I'm not sure where you're seeing the vertical lines, maybe jpeg noise? Background is attached if you want to take a look at it.

I think you've achieved what I've been getting at but I don't understand why it's not working on this side. :confused: The only step I didn't illustrate was increasing to 16 million colors, it doesn't seem right that PSP 9 would have this rather hampering limitation. I pretty sure Vuldacon uses PSP, maybe he would know...

For the record it's limestone :) (the stuff the Fireaxis VP location is probably made of, it does use a limestone texture).
 

Attachments

  • CB_SampleBonusLarge.pcx
    3.6 KB · Views: 44
OK to me it looked like a sugar cube. It could very well be jpeg artifact. I am not sure why increasing colors to rgb rather than indexed would cause any problems.
 
It's looks like you are well on your way to a solution.

Well, more or less. What BK was able to accomplish is not comparable to the last result I got shown above. Short of doing some pretty monotonous palette editing (that might not turn out right the first time, and might not work at all) I'm sorta at the end of my rope. It seems to me that there's gotta be a better/easier way to get all this done in PSP like there is in... PhotoShop I'm presuming?

As a general FYI, I often get better results by doing the palette indexing with GIMP even when I've done the majority of work in other programs.

I had thought of this of giving this a go, to present palette related stuff has been much easier in PSP. Do you index it to 254? All I remember is an option to index...
 
Well, more or less. What BK was able to accomplish is not comparable to the last result I got shown above. Short of doing some pretty monotonous palette editing (that might not turn out right the first time, and might not work at all) I'm sorta at the end of my rope. It seems to me that there's gotta be a better/easier way to get all this done in PSP like there is in... PhotoShop I'm presuming?



I had thought of this of giving this a go, to present palette related stuff has been much easier in PSP. Do you index it to 254? All I remember is an option to index...
Either index it to 254, which is what I usually do, or include a pixel or two each of the reserved colors, then swap colors afterwards. You also have a choice of different palette reduction algorithms; sometimes it takes trying each to find the best result.
 
Well, more or less. What BK was able to accomplish is not comparable to the last result I got shown above. Short of doing some pretty monotonous palette editing (that might not turn out right the first time, and might not work at all) I'm sorta at the end of my rope. It seems to me that there's gotta be a better/easier way to get all this done in PSP like there is in... PhotoShop I'm presuming?
Yes I use photoshop and those are screenshots from photoshop. I wish I was more familiar with PSP to help you out but when I started doing graphics I quickly learned that adobe was the industry standard and professional print shops print directly from psd's or ai's so I made the initial investment.
 
againsttheflow... I am not quite sure exactly what problems you are having but the easiest way to make any of the Resource Images with their Respective backgrounds, is to start with the Backgrounds which have 86+Magenta and Green=88 Colors to Keep the background shades correct as they are.

Start by reducing the Colors for an Image to 168 colors, Set the Resource Background you want to 16 Million Colors then add the Image to the Resource Background. Check the Number of Colors (Image/Count Image Colors) and IF Under 254 go back and reduce using more colors or over 254, go back to the Resource Image and starting at 16 Million colors or what ever the image started with, reduce the colors again but add the number of colors that the Image was above 254 colors when you first placed the Image on the background. This will reduce the Image colors more accurately so when you place the image on the 16 Million Color Background again, the Colors will be 254. IF Not, do the Image Color Reduction step again until you have exactly 254 colors when it is pasted on the Resource Background. You can then Reduce the Resource with its Correct Background to 256 colors and you will have 254 Colors that will allow you to place the Magenta and Green Transparant colors at the end correct index possitions.
... You Reduce the Colors to 256 colors using Optimized Octree, Nearest Color as you have discovered.

You can get All Resource Backgrounds that I made as Blanks for use Here:
http://forums.civfanatics.com/showthread.php?t=125666&page=3 Post #42
Let me know if any problems or if I failed to understand what you are wanting to know. :)
Edit: sorry, many things on my mind...I corrected the numbers you want when evaluating the Resource Image on the 16 Million Color Resource Background to 254 with the above steps. This will allow you to place the Magenta and Green on the palette for a Total of 256 colors.
 
IF you try to simply add an image to the Bland Background then Reduce Colors...you will Not Keep all Necessary subtile shades of the Background because when we reduce colors, the program is reducing over all colors as represented by their percentages in the image. Because of the need to have new colors added for the image, many of the subtile background colors will be "Blended" into fewer colors and this cause Streak Lines.

Also Keep in mind that many of the Background colors will be in some or most of the Resource images you want to use and this is good because that allows you to add more new colors for the Image itself.
Bottom Line...add the Resource to the Resource Background that you have made 16 Million Colors, Evaluate the Total Number of Colors there with the Resource placed on the Background. Reduce the Resource Image colors according to what you need to gain a total of 254 colors so you can reduce the Resource Image with its Background to 256 colors and have 254 colors on the palette when it is Reduced. You then add the Magenta a Green Colors to their correct index at the end.
 
Thanks Vuldacon, I'll give it a go. That Count Image Colors feature sounds like just the thing, had not known about that. :)
 
Top Bottom