Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to load a palette file (.pal) to images which i have opened. as images are huge i cant do it manually. can any one suggest me to do this.

share|improve this question
If you're asking for an application, why did you add "corel-paint-shop-pro" and "" tags? – bummzack Nov 3 '11 at 13:48
I don't understand what "load a palette file to images" means: are you wanting to derive a palette from the individual image data and apply that, or do you want to apply a fixed palette file to random images? – horatio Nov 3 '11 at 15:57
The old Halo format has two files. One is the .cut file with the basic pixel information but no color, the other is the optional .pal file with the color table. You could switch color tables on the fly without ever opening the image. A bit clunky by modern standards, but the format still hangs in there. Corel recognizes it; Photoshop and AI do not. – Alan Gilbertson Nov 10 '11 at 8:57
up vote 2 down vote accepted

This probably belongs on SU or SO, but since we're here, and it's vaguely design-related, here goes:

Since a .pal is a "sidecar" file, it only has to have the same name as the bitmap file it accompanies and be in the same directory. The fast way to do what you need would be to construct a simple script in Mac OS or Windows. There is no need to open the files at all.

The following instructions are for Windows, but the same procedure applies in Mac OS or Linux.

  • Dump a bare directory listing of the .cut (or whatever) bitmap files to a text file using dir /b *.* > listing.txt.

  • Open the resulting file in a text editor that supports regular expressions, such as Notepad++, and change all the (.cut or whatever) extensions to .pal.

  • If foo.pal is the master palette file, add copy foo.pal to be beginning of every line of listing.txt using a regular expression search and replace. Search for ^ (the start of any string) and replace with copy foo.pal to add the copy command to the start of every line all in one shot. This is why you want something like Notepad++ (or any text editor that supports grep).

  • Rename your listing.txt to listing.bat and execute it.

In Mac OS or Linux, the same general procedure applies, but in that case I'd probably pipe the ls output through sed using the same regular expression to get the executable in one shot.

In either case, do check the script file to make sure you got the command lines correct before you run it. It will save unnecessary deleting of bogus files!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.