gpl2jascpal
gpl2jascpal
I have just finished and released the first version (Linux version [Edit: + Windows version]) of gpl2jascpal. This utility converts GIMP gpl palettes to JASC pal palettes. GIMP can already import JASC pal palettes, but it can not yet export palettes to the JASC pal format. PoP1 pal files can now be imported into GIMP, exported as GIMP gpl palettes, and then converted back to JASC pal palettes with this utility.
It is currently only available for GNU/Linux.
David or someone else might port it to Windows at some point.
I will soon publish documentation that explains how to import and export images with PR, and how palettes can be changed using GIMP (and this gpl2jascpal utility).
(I know that Paint Shop Pro can edit JASC pal palettes, but I use GIMP on my GNU/Linux machine. GIMP is also available for Windows and Mac OS X.)
It is currently only available for GNU/Linux.
David or someone else might port it to Windows at some point.
I will soon publish documentation that explains how to import and export images with PR, and how palettes can be changed using GIMP (and this gpl2jascpal utility).
(I know that Paint Shop Pro can edit JASC pal palettes, but I use GIMP on my GNU/Linux machine. GIMP is also available for Windows and Mac OS X.)
Re: gpl2jascpal
I've ported it to Windows.
Link: http://www.freeweb.hu/princepersia/en/g ... l01_dl.htm
Please note that I haven't tested it, because I don't have .gpl files.
Link: http://www.freeweb.hu/princepersia/en/g ... l01_dl.htm
Please note that I haven't tested it, because I don't have .gpl files.
Re: gpl2jascpal
Hey, thanks for taking a look at it.
Here are some sample .gpl files (three mirrors, each has the same .zip):
http://www.mediafire.com/?1g7wnd8707m6ozb
http://www.megaupload.com/?d=9FKHU06K
http://www.sendspace.com/file/ayn1me
The Windows version appears to create .pal files which have lines that end with:
0D 0D 0A (\r\r\n).
This should be 0D 0A (\r\n).
Apparently the write function under Windows already adds the \r by itself.
So, \r should be removed from the code everywhere.
(On lines 258, 260, 262 and 266.)
Here are some sample .gpl files (three mirrors, each has the same .zip):
http://www.mediafire.com/?1g7wnd8707m6ozb
http://www.megaupload.com/?d=9FKHU06K
http://www.sendspace.com/file/ayn1me
The Windows version appears to create .pal files which have lines that end with:
0D 0D 0A (\r\r\n).
This should be 0D 0A (\r\n).
Apparently the write function under Windows already adds the \r by itself.
So, \r should be removed from the code everywhere.
(On lines 258, 260, 262 and 266.)
Re: gpl2jascpal
Another solution is to add |O_BINARY to the flags in the call to the open function.Norbert wrote:So, \r should be removed from the code everywhere.
I also used O_BINARY when porting Apoplexy to Windows.
I've fixed the bug using the latter way.
Link: http://www.freeweb.hu/princepersia/en/g ... l01_dl.htm
Re: gpl2jascpal
Thanks.
-
- Scholar Scribe
- Posts: 4
- Joined: April 21st, 2014, 11:43 am
- Location: Hungary
Re: gpl2jascpal
Hello!
I have a problem with gpl2jascpal: I don't know how to use it. Could you send me a description about it? (I know, I'm very bad in things like this, but this is the only obstacle between my mod and me )
I have a problem with gpl2jascpal: I don't know how to use it. Could you send me a description about it? (I know, I'm very bad in things like this, but this is the only obstacle between my mod and me )
Re: gpl2jascpal
You need to run it from the command line, and pass the path/name of the .gpl file as a command line parameter.
The converted palette is written into a new file with .pal extension.
The converted palette is written into a new file with .pal extension.
Re: gpl2jascpal
If you're on Windows, make sure you're using the Windows version.
Additional information about using gpl2jascpal can be found in this document, although that document is somewhat Linux-oriented.
The easiest thing to do when changing images of PoP for DOS is to not change palettes.
Get GIMP (Windows version here) and only use the Colormap (see "5. Using The Colormap" in the document mentioned above).
If you don't touch any palettes, changing images is a lot easier.
Additional information about using gpl2jascpal can be found in this document, although that document is somewhat Linux-oriented.
The easiest thing to do when changing images of PoP for DOS is to not change palettes.
Get GIMP (Windows version here) and only use the Colormap (see "5. Using The Colormap" in the document mentioned above).
If you don't touch any palettes, changing images is a lot easier.
-
- Scholar Scribe
- Posts: 4
- Joined: April 21st, 2014, 11:43 am
- Location: Hungary
Re: gpl2jascpal
Thank you!
Re: gpl2jascpal
Okay, it looks like this tool only works for customly saved .gpl palettes, because these have a tab+name after the blue color.
Old content of this post:
Old content of this post:
Spoiler: show
Last edited by Norbert on December 16th, 2017, 3:28 pm, edited 1 time in total.
Re: gpl2jascpal
I just checked whether GIMP's default (non-custom) palettes used to also have tab+name after the blue color back in the day.
(By installing GIMP 2.6.9 for Windows with Wine.)
And they did!
Code: Select all
norbert@stimpy ~ $ cat /home/norbert/.wine/drive_c/Program\ Files\ \(x86\)/GIMP-2.0/share/gimp/2.0/palettes/Web.gpl |tail -n 1
0 0 0 Untitled
Code: Select all
norbert@stimpy ~ $ cat /usr/share/gimp/2.0/palettes/Web.gpl |tail -n 1
0 0 0
Re: gpl2jascpal
Here's the new release (v0.2): for Windows (mirror) and for GNU/Linux (mirror).
This version changes:
Code: Select all
+ Now also processes, with a warning, input palettes that have neither 16 (4 bit) nor 256 (8 bit) colors.
* Nowadays, GIMP's predefined gpl palettes no longer include "Untitled" color names, making these names optional. Fixed gpl2jascpal accordingly.
Re: gpl2jascpal
I didn't need to use this program I can translate RGB numbers to colors and vice versa
Anyway thanks for this program
Anyway thanks for this program
65536