Trouble with PCX for tech chooser icons

robotlincoln

Chieftain
Joined
Sep 29, 2018
Messages
54
I've made some tech chooser icons with ChatGPT that I'm pretty happy with, and I'm using GIMP to convert the files to .pcx format, but the icons are showing up as black boxes when I try to use them. They have the right dimensions, but I don't know if there are other parameters that need to be met for them to be readable. Does anyone know a fix?
 

Attachments

  • Advanced Fuels.png
    Advanced Fuels.png
    1.6 MB · Views: 3
  • Health v2.png
    Health v2.png
    1.8 MB · Views: 1
  • Health.png
    Health.png
    2.1 MB · Views: 2
  • Internationalism.png
    Internationalism.png
    1.9 MB · Views: 3
  • Military Training.png
    Military Training.png
    2.1 MB · Views: 3
  • Refrigeration.png
    Refrigeration.png
    2 MB · Views: 4
  • Special Operations.png
    Special Operations.png
    1.9 MB · Views: 3
  • Subsea Extraction.png
    Subsea Extraction.png
    1.8 MB · Views: 2
  • Television.png
    Television.png
    1.7 MB · Views: 1
  • Guerilla Warfare.png
    Guerilla Warfare.png
    2.3 MB · Views: 2
  • Emancipation.png
    Emancipation.png
    2.1 MB · Views: 2
  • Advanced Spaceflight.png
    Advanced Spaceflight.png
    1.8 MB · Views: 1
  • Artificial Intelligence.png
    Artificial Intelligence.png
    2 MB · Views: 2
  • Cavalry Tactics.png
    Cavalry Tactics.png
    2.1 MB · Views: 1
  • Cold Fusion.png
    Cold Fusion.png
    1.6 MB · Views: 1
  • Combined Arms v2.png
    Combined Arms v2.png
    2.2 MB · Views: 1
  • Combined Arms.png
    Combined Arms.png
    2.3 MB · Views: 2
  • Democratic Republic.png
    Democratic Republic.png
    2.2 MB · Views: 3
  • Elephantry.png
    Elephantry.png
    2.1 MB · Views: 3
Including some of the .pcx files here for reference.
 

Attachments

(comment number 6)

Open the image in GIMP, go to Image > Mode > Indexed, set the number of color slots to 254, then export the image as a .pcx file.
 
I don´t use Gimp, but PSP 7. The reason for "black boxes" mostly is, that the image still has 16 mio colours instead of 256 colours, so in a first step the colours must be reduced to 256 and in a second step the correct colour slots in a palette must be set to transparency, for PSP 7 the last slot must be set to magenta and the slot before the last slot to "poison-green".

When downloading your cavalry large example, the colours of the image still are 16mio colours and not the needed 256 colours - and than the next step for setting transparency must follow edit: may be as written in the post above by Gimp (that I don´t use).
 
Last edited:
Your images need to be in Indexed mode, and you also need to add one pink color and one green color, then rearrange them the same way I did for you. Blue Monkey made a tutorial on how to create a proper palette in GIMP.

 

Attachments

you don't need green and magenta in the palette for these images, it works with with 254 colors. here is a tutorial in gimp on how to do it.

Step 1. Open the image in gimp and scale it up to for example 150 X 150. by, Go to Image > Scale Image. Paint it with full magenta (RGB 255,0,255) or green (RGB 0,255,0).

Not like this, so you don't get mixed magenta and green.

notlikethis.png


Paint it fully with magenta then copy paste over your 128X128 image. Then select a square on magenta (hotkey R) and paint it fully with green (RGB 0,255,0).

1.png


Not like in the next image, but fully green.

2.png



Like this.

3.png




Now make the palette by, Go to Image > Mode > Indexed and select 256 colors, press convert.

4.png




The palette will appear in right corner, if it doesn't appear, open it by, Go to Windows > Dockable Dialogs >Colormap.

5.png



Now you need to rearrange magenta and green to the last two slots on the palette. Right click on the palette and and select Rearrange Colormap. Then select magenta and drag it to the last slot on the palette and green to the before last slot.

7.png



Like this.

8.png


Now scale down the image back to 128X128, by, Go to Image > Scale Image

9.png



Now select your initial image and copy paste it over the image with the palette.

10.png



Now export it by, Go to File > Export As..., and manually change the file extension to the .pcx. Save as will not work, you have to export as..., in Gimp.
 
Last edited:
Thanks, figured it out and it's working. Posting the results in case anyone wants to use them.
 

Attachments

Continued
 

Attachments

A faster way to make a palette in Gimp. Convert an image to 254 colors, open the palette, Go to Windows > Dockable Dialogs >Colormap. Then add two new slots by pressing plus button and manually select green and magenta. i didn't think of that before.
 
That approach makes sense. The way I worked it out was just to have ChatGPT generate a frame with each image, open each image in Paint and paint part of the frame green and magenta, then open it in GIMP and convert to 256, then extract the image from the frame by just copy-pasting. Pretty happy with the results.
 
There's something about the cartoonish, computer-generated, generic quality of them that fits with Civ3's visual language. I think if I saw these images in an advertisement or somewhere else I'd be kind of averse, but here they work.
 
Back
Top Bottom