views:

105

answers:

3

Im creating a program that generates a palette from a true color image, I need some help with some file formats

It already creates a photoshop cs3 palette

i haven't found any info on how to make a Paintshop pro 8 palette or a gimp palette

plus i would be happy to look up any other art program palette types to improve compatibility with my program

A: 

For PSP palettes: .pal file extension

According to the GIMP's documentation, the .gpl file format is in ASCII so it shouldn't be difficult to create a convertor by looking at the file itself.

strager
A: 

Paint.NET palettes are easy. It's a .txt with each line being a hex-color (AARRGGBB). Semicolons (;) are comments. Example:

;comment
FF000000
FFFFFFFF
00000000

GIMP uses an ASCII plaintext format with extension .gpl. Take a peek with your favorite notepad program.

pyrochild
A: 

GIMP palettes are just text files. Assuming you're pulling RGB values, you generate a text file like this:

GIMP Palette
Name: custompalette
Columns: 4
#
  0   0   0     Index 3
 65  38  30     Index 4
103  62  49     Index 6
 79  73  72     Index 7
114 101  97     Index 8
208 127 100     Index 9 
151 144 142     Index 10
221 207 199     Index 11
David Weitz