Author Topic: Extract CLUT and turn it into a Paint Shop Pro palette?  (Read 333 times)

NERV Agent

  • Cool newbie
  • *
  • Posts: 82
  • Karma: 3
  • GOD'S IN HIS HEAVEN. ALL'S RIGHT WITH THE WORLD.
    • View Profile
I am dealing with the ".TIM" file that contains the hand cursor graphics in "WINDOW.BIN". This ".TIM" has 16 CLUTs, each with 16 colors. I would like to extract some of these CLUTs and have them in ".PspPalette" or ".pal" format that can be used with Jasc Paint Shop Pro 9.

I realize I can always take an existing 16 color Paint Shop Pro palette and just change the index values to match what is in the CLUT, but that is time consuming. (Also, if this was a 256 color CLUT, that would be an arthritis inducing nightmare.)

Is there a way to extract CLUTs from a ".TIM" and have it in a palette format that can be loaded into Jasc Paint Shop Pro 9?

Maki

  • Lana Del Rey
  • Insane poster
  • *
  • Posts: 420
  • Karma: 76
  • Final Fantasy VIII reverse team
    • View Profile
Re: Extract CLUT and turn it into a Paint Shop Pro palette?
« Reply #1 on: 2017-07-15 11:09:09 »
I can code a tool for this, but that palette format for your software could be a problem. I doubt there's a file structure somewhere out there. What if I exported each color from palette to HEX codes? Could that help you a bit?

NERV Agent

  • Cool newbie
  • *
  • Posts: 82
  • Karma: 3
  • GOD'S IN HIS HEAVEN. ALL'S RIGHT WITH THE WORLD.
    • View Profile
Re: Extract CLUT and turn it into a Paint Shop Pro palette?
« Reply #2 on: 2017-07-16 06:54:43 »
Hmmm. To be honest, I don't know how the formatting for a ".PspPalette" or ".pal" file works.

However, I did find some resources on the file structure of a ".TIM" file awhile back, which includes the CLUT.

https://web.archive.org/web/20120529162751/http://rveach.romhack.org/PSXInfo/tim.html

http://www.romhacking.net/documents/timgfx.txt

Thanks for the response.

Maki

  • Lana Del Rey
  • Insane poster
  • *
  • Posts: 420
  • Karma: 76
  • Final Fantasy VIII reverse team
    • View Profile
Re: Extract CLUT and turn it into a Paint Shop Pro palette?
« Reply #3 on: 2017-07-16 10:54:19 »
Hmmm. To be honest, I don't know how the formatting for a ".PspPalette" or ".pal" file works.

However, I did find some resources on the file structure of a ".TIM" file awhile back, which includes the CLUT.

https://web.archive.org/web/20120529162751/http://rveach.romhack.org/PSXInfo/tim.html

http://www.romhacking.net/documents/timgfx.txt

Thanks for the response.

Okay, if you could please send me two-three palettes containing:
-only white
-only blue
-only red

I'll try to reverse it

hotdog963al

  • Crazy poster
  • *
  • Posts: 222
  • Karma: 2
  • Horse
    • View Profile
    • Horse HQ
Re: Extract CLUT and turn it into a Paint Shop Pro palette?
« Reply #4 on: 2017-07-16 15:26:12 »
Jasc (Paint Shop Pro) Palette files start with the following 3 lines:

Code: [Select]
JASC-PAL
0100
256

Then that follows with 256 lines of RGB values (each colour value separated with a space, eg: 0 0 0)
Simple as that :)

Maki

  • Lana Del Rey
  • Insane poster
  • *
  • Posts: 420
  • Karma: 76
  • Final Fantasy VIII reverse team
    • View Profile
Re: Extract CLUT and turn it into a Paint Shop Pro palette?
« Reply #5 on: 2017-07-17 07:10:49 »
Jasc (Paint Shop Pro) Palette files start with the following 3 lines:

Code: [Select]
JASC-PAL
0100
256

Then that follows with 256 lines of RGB values (each colour value separated with a space, eg: 0 0 0)
Simple as that :)

So the 16 color palette would be like:
Code: [Select]
JASC-PAL
0100
16
...
?

Okay, I'll be back here soon

Kaldarasha

  • No life
  • *
  • Posts: 2096
  • Karma: 125
  • Prince of Model Editing
    • View Profile
Re: Extract CLUT and turn it into a Paint Shop Pro palette?
« Reply #6 on: 2017-07-17 07:17:21 »
I don't think so. 16 would create one palette with only 16 different colors. My guess is that 0100 is the number of the palette and the number after it defines the number of colors (or the color variation) it contains. 0200 is probably the next logical palette.

hotdog963al

  • Crazy poster
  • *
  • Posts: 222
  • Karma: 2
  • Horse
    • View Profile
    • Horse HQ
Re: Extract CLUT and turn it into a Paint Shop Pro palette?
« Reply #7 on: 2017-07-17 18:17:51 »
Just tested. Can confirm, 16 colour:

JASC-PAL
0100
16