PIC and PAL files viewer?

What are the *.Pic and *.Pal? Can anyone show images here on the forum?

stwils

They are the graphic files of Civilization; I suppose that the *.pic files contain the image data, and the *.pal files contain the color palettes; in fact almost all the *.pic files have a corresponding *.pal file; i say "almost" because some *.pic files have no corresponding *.pal file.

I tried to open them with some graphic format but they didn't "recognize the format"... :(

Click on the image to view a part of the contente of the civ root folder
 

Attachments

  • PicPal.jpg
    PicPal.jpg
    91.9 KB · Views: 349
Thanks. (I can't really see what they are...)

By the way, your English is fine. :)

stwils
 
I don't know how to display the .PIC files, but I would bet that they are RLE encoded pictures. Take the BIRTH*.PIC as examples. Each file should be the same image size, since I'm betting these are the intro sequence when you start a new game (the birth of a world). But the file sizes are different. It should be easy to write a viewer for them if we could figure out how the data is stored. I've written many RLE encoders/decoders in the past. We just need to know the little details, the specifics of how they represent runs, where they put image size data, etc.
 
I don't know how to display the .PIC files, but I would bet that they are RLE encoded pictures. Take the BIRTH*.PIC as examples. Each file should be the same image size, since I'm betting these are the intro sequence when you start a new game (the birth of a world). But the file sizes are different. It should be easy to write a viewer for them if we could figure out how the data is stored. I've written many RLE encoders/decoders in the past. We just need to know the little details, the specifics of how they represent runs, where they put image size data, etc.


I took a little look at the PAL files each is 782 bytes. Assuming that each of the 256 colors is made up of 3 bytes, one byte for each RGB. 3 * 256 = 768 so the extra 14 bytes must be some sort of header info.

Sometime after reading your post, I was riding along and I starting thinking about the PIC file format. It hit be like a ton of bricks the palette information is not stored in the PIC file after all. See the thread PIC file format


I had been searching to find the format of other files named PIC thinking that CIV DOS was using some standard (previously defined format) format.
 
Now i just have to find a way to make a "PRINT SCREEN" of these images.. :huh:

The only acceptable solution that I've found is to start DOS shell (at least cmd.exe) and use one of the old DOS screen-grabbers.

Btw I've already saved all graphics from CIV's .PIC files in GIF format, so I can just email it to you or upload here. Unfortunately PIC.EXE has a bug, due to which there're few defects in some of the resultant images.
 
The only acceptable solution that I've found is to start DOS shell (at least cmd.exe) and use one of the old DOS screen-grabbers.

An alternate method:
Install dosbox
Copy PIC.EXE to c:\mps\civ
In XP, click start, accessories, command prompt
At the prompt enter the following two lines:
cd C:\Program Files\DOSBox-0.65
dosbox -c "mount c \mps\civ\" -c "c:" -c


at the c:> prompt
c:>PIC ARCH.PIC

After the PIC file is displayed CTRL-F5 will produce a file in
C:\Program Files\DOSBox-0.65\capture
With a name something like this pic_000.png
Then a space key and you will get the c:> prompt again

Unfortunately PIC.EXE has a bug, due to which there're few defects in some of the resultant images.

In what files did you find these errors?
Did they appear on the screen or only in the saved file?

Note: Your dosbox version may differ from the example

 
The only acceptable solution that I've found is to start DOS shell (at least cmd.exe) and use one of the old DOS screen-grabbers.

Btw I've already saved all graphics from CIV's .PIC files in GIF format, so I can just email it to you or upload here. Unfortunately PIC.EXE has a bug, due to which there're few defects in some of the resultant images.

Thank you if you email me the files or if you uploadad them here.. (i don't know any "DOS screen-grabber")

An alternate method:
Install dosbox

Thank you!! it works!! :goodjob:

In what files did you find these errors?

The files with defects (one or more horizontal or vertical black lines) are:
BACK1A.PIC
BACK2A.PIC
BIRTH5.PIC
BIRTH7.PIC
CBACK.PIC
CBACKS1.PIC
CBACKS2.PIC
CBACKS.PIC
CUSTOM.PIC
DISCOVR1.PIC
HILL.PIC
ICONPGC.PIC
ICONPGT1.PIC
ICONPGT2.PIC
KING12.PIC (a green line under the left eye of Washington; is it native american painting? :))
SAD.PIC

Ifrit9, Dack: :worship: :bowdown: i salute you! :) :)
 
DOSBox method is Ok, but it saves images in PNG format, in which they don't represent original ones by 100.0% (because of PNG compression).

The file is too big for attachment, so I uploaded it directly: http://forums.civfanatics.com/uploads/58983/CIV1PIC.zip (1.6 MB, 98 files)

PS. SPRITES.PIC cannot be viewed by PIC.EXE. Maybe it's a non-standard PIC file.
 
DOSBox method is Ok, but it saves images in PNG format, in which they don't represent original ones by 100.0% (because of PNG compression).

PNG format uses a lossless compression.
i.e. there is no loss of data.
 
JPG is the only common image file that does not look exactly like the source (because it throws away data to make a smaller file).

GIF and PNG both use the same basic method (also the same basic method as ZIP files) to compress images, they save all the data, and they always look exactly the same as the original.
 
GIF and PNG both use the same basic method (also the same basic method as ZIP files) to compress images, they save all the data, and they always look exactly the same as the original.

My fault, thanks Dack and Alex Johnson. For some reason I thought PNG uses the same methods as TIFF...
 
While TIFF can theoretically house JPEG data, LZW (also used in GIF) and RLE (also used in BMP) lossless compression methods are more common. There's even a hack to stuff DEFLATE (PNG type) data into TIFF as well.
 
LZW is an alternative option in TIFF, not the default compression method, AFAIK.
 
TIFF has few "default" options; its excessive flexibility is a major factor in its scarcity.
 
The corruption is not the biggest problem with PIC.EXE. The fact that it uses a black RGB(0,0,0) background is. This makes it impossible to separate masks (transparent pixels) from actual intended blacks.

Does anyone know a way to use some color other than black as background for exporting the CivDOS graphics?

SPRITES.PIC cannot be viewed by PIC.EXE. Maybe it's a non-standard PIC file.
It certainly can.

The easiest way is to use the command "PIC *.PIC" (if PIC.EXE is located in your CivDOS directory). A (lossless) PNG of SPRITES.PIC is attached.

SPRITES.PIC looks like CGA, but it definitely has its uses. Intended blacks are not represented as blacks, so this is a way of figuring out at least some of the intended blacks. Most mysteries still remain, however.



EDIT:
Here is another modified SPRITES.PNG called SPRITES_CORRECTED_UNIT_COLORS.PNG, in which I have corrected the unit colors (and some of the other colors) to match the VGA colors of the SP257.PNG (check the RAR archive in the next post). The left version is with a colored background, while the right version is with a black background. So this is how the unused unit graphics would've looked for the Zulus and Babylonians, had they been used in the game.



I wonder if the unused Cavalry unit is carrying a Carbine? I definitely like the look of the two Jets (I would put some bombs under the wings of the rightward one). The Ironclad appears redundant (pretty much unchanged) as does the Knight. The chopper could make a swift and versatile hit-n-run style Gunship unit. I've always thought of the Artillery as a Mobile Artillery unit, but maybe the unused Artillery was really supposed to be the Mechanized Artillery of CivDOS? Or maybe it's just a Mobile Mortar? I don't know, looks nice though.
 

Attachments

  • sprites.pic.png
    sprites.pic.png
    12.8 KB · Views: 1,414
  • SPRITES_CORRECTED_UNIT_COLORS.PNG
    SPRITES_CORRECTED_UNIT_COLORS.PNG
    16.4 KB · Views: 1,355
Here is a RAR archive containing captures of all 106 PIC files using PIC.EXE in DosBox. My game version is v5 (474.05). CivDOS of course.


EDIT:
OK, the file names in the old RAR archive were like PIC_000.PNG, PIC_001.PNG, etc. Now I've renamed all 106 PNGs after their proper corresponding PIC files, such as ADSCREEN.PNG, ARCH.PNG, etc. So get the new archive instead (I deleted the old one). Other than that, everything else is the same.

And yeah, this was done with a "fresh" install. (Install Civilization, apply patch v5 and that's it.)
 

Attachments

  • CivDOS_474_05_PIC_to_PNG.rar
    949 KB · Views: 236
Top Bottom