Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
On 12/22/09, Daniel wrote: Hi, There is also a standalone Windows program that does this conversion: And on Linux (also usable on Windows when Python is installed) it is SwatchBooker: http://www.selapa.net/swatchbooker/ Alexandre ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
Hi! Trying to use the python-script on OS X 10.4 PPC (first updated python to 2.6, got GIMP 2.6.1) but it's not working. When I try to import the *.ase in to GIMP palettes it says: Unknown filetype. Maybe I failed by moving the file convert_ASE_to_GPL.py into the right folder?? Where should I put it? Thanks Tina Von: Chris Mohler [EMAIL PROTECTED] Datum: Sat, 11 Oct 2008 10:33:12 -0500 An: [EMAIL PROTECTED] Cc: gimp-user gimp-user@lists.xcf.berkeley.edu Betreff: Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files On Sat, Oct 11, 2008 at 6:53 AM, Hedley Finger [EMAIL PROTECTED] wrote: Chris Mohler wrote: I made the plugin bit more friendly and uploaded it to the registry: http://registry.gimp.org/node/10325 ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
On Mon, Oct 13, 2008 at 4:42 AM, Bettina Karena Lechner [EMAIL PROTECTED] wrote: Hi! Trying to use the python-script on OS X 10.4 PPC (first updated python to 2.6, got GIMP 2.6.1) but it's not working. When I try to import the *.ase in to GIMP palettes it says: Unknown filetype. Maybe I failed by moving the file convert_ASE_to_GPL.py into the right folder?? Where should I put it? Thanks Tina Hi Tina, To make sure the plug-in is installed, go to Help-Plug-in Browser and enter palette in the search box. If Import ASE Palette is listed, then the plug-in has been installed properly. If not, someone here should know where to place the plug-in file (in OS X). If it's installed, but not working: are you using an ASE file from Kuler? Can you copy the exact error message? If it's a Kuler file and won't open, could you send it to me at [EMAIL PROTECTED] Thanks, Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
Hi Chris, thanks for your help. Seems that the py isn't installed correctly cause I can't find it in the plug-in browser. Usually I place plug-in files here: /Users/username/Library/Application Support/Gimp/plug-ins (and they are working though) anyone knows a better place under OS X for *.py files?? thank you in advance, tina Von: Chris Mohler [EMAIL PROTECTED] Datum: Mon, 13 Oct 2008 11:24:17 -0500 An: Bettina Karena Lechner [EMAIL PROTECTED] Cc: gimp-user gimp-user@lists.xcf.berkeley.edu Betreff: Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files On Mon, Oct 13, 2008 at 4:42 AM, Bettina Karena Lechner [EMAIL PROTECTED] wrote: Hi! Trying to use the python-script on OS X 10.4 PPC (first updated python to 2.6, got GIMP 2.6.1) but it's not working. When I try to import the *.ase in to GIMP palettes it says: Unknown filetype. Maybe I failed by moving the file convert_ASE_to_GPL.py into the right folder?? Where should I put it? Thanks Tina Hi Tina, To make sure the plug-in is installed, go to Help-Plug-in Browser and enter palette in the search box. If Import ASE Palette is listed, then the plug-in has been installed properly. If not, someone here should know where to place the plug-in file (in OS X). If it's installed, but not working: are you using an ASE file from Kuler? Can you copy the exact error message? If it's a Kuler file and won't open, could you send it to me at [EMAIL PROTECTED] Thanks, Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
On Mon, Oct 13, 2008 at 11:45 AM, Bettina Karena Lechner [EMAIL PROTECTED] wrote: Hi Chris, thanks for your help. Seems that the py isn't installed correctly cause I can't find it in the plug-in browser. Usually I place plug-in files here: /Users/username/Library/Application Support/Gimp/plug-ins (and they are working though) anyone knows a better place under OS X for *.py files?? thank you in advance, tina I'm just guessing, but it seems to me like either python is not installed (or not installed properly), or gimp's python bindings are not installed. Someone with more experience running GIMP on OSX will hopefully be along to help you out, but in the meantime: which site did you download/install GIMP from? Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
Hi Chris, python is working properly. I run a test in the terminal-window and everythink worked fine. but maybe that was a hint: where do I get this: or gimp's python bindings are not installed. I downloaded Gimp from here: http://gimp.lisanet.de/Website/Download.html joy! tina Von: Chris Mohler [EMAIL PROTECTED] Datum: Mon, 13 Oct 2008 11:58:46 -0500 An: Bettina Karena Lechner [EMAIL PROTECTED] Cc: gimp-user gimp-user@lists.xcf.berkeley.edu Betreff: Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files On Mon, Oct 13, 2008 at 11:45 AM, Bettina Karena Lechner [EMAIL PROTECTED] wrote: Hi Chris, thanks for your help. Seems that the py isn't installed correctly cause I can't find it in the plug-in browser. Usually I place plug-in files here: /Users/username/Library/Application Support/Gimp/plug-ins (and they are working though) anyone knows a better place under OS X for *.py files?? thank you in advance, tina I'm just guessing, but it seems to me like either python is not installed (or not installed properly), or gimp's python bindings are not installed. Someone with more experience running GIMP on OSX will hopefully be along to help you out, but in the meantime: which site did you download/install GIMP from? Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
On Mon, Oct 13, 2008 at 1:18 PM, Bettina Karena Lechner [EMAIL PROTECTED] wrote: Hi Chris, python is working properly. I run a test in the terminal-window and everythink worked fine. but maybe that was a hint: where do I get this: or gimp's python bindings are not installed. I downloaded Gimp from here: http://gimp.lisanet.de/Website/Download.html joy! tina It looks like that package includes gimp-python. See Sven's comment - make sure the .py file is executable. Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
the italian say buh when they don't know what to do :) so: make sure the .py file is executable. buh?? tina Von: Chris Mohler [EMAIL PROTECTED] Datum: Mon, 13 Oct 2008 13:32:27 -0500 An: Bettina Karena Lechner [EMAIL PROTECTED] Cc: gimp-user gimp-user@lists.xcf.berkeley.edu Betreff: Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files On Mon, Oct 13, 2008 at 1:18 PM, Bettina Karena Lechner [EMAIL PROTECTED] wrote: Hi Chris, python is working properly. I run a test in the terminal-window and everythink worked fine. but maybe that was a hint: where do I get this: or gimp's python bindings are not installed. I downloaded Gimp from here: http://gimp.lisanet.de/Website/Download.html joy! tina It looks like that package includes gimp-python. See Sven's comment - make sure the .py file is executable. Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
On Mon, Oct 13, 2008 at 2:13 PM, Bettina Karena Lechner [EMAIL PROTECTED] wrote: the italian say buh when they don't know what to do :) so: make sure the .py file is executable. buh?? tina I used to use a mac daily, so it's kind of sad that I don't remember exactly how to set it in the finder :( I think it's somewhere off in properties or file info. This should work though: in a terminal, cd to the directory with the .py file. Then enter chmod +x convert_ASE_to_GPL.py - no quotes. Then entering ls -l should show the permissions string like: -rwxr-xr-x Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
Thank you so much everyone! Changing the permissions helped to find the import-palette.py in the plug-in browser and to make it run. Everything is working fine now - I also see the additional menu-entry in the import-menu. But a hint for all: don't try to import the file over the standard-entry (import palette ... :)) have a good night! Tina Von: Chris Mohler [EMAIL PROTECTED] Datum: Mon, 13 Oct 2008 14:31:29 -0500 An: Bettina Karena Lechner [EMAIL PROTECTED] Cc: gimp-user@lists.xcf.berkeley.edu Betreff: Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files On Mon, Oct 13, 2008 at 2:13 PM, Bettina Karena Lechner [EMAIL PROTECTED] wrote: the italian say buh when they don't know what to do :) so: make sure the .py file is executable. buh?? tina I used to use a mac daily, so it's kind of sad that I don't remember exactly how to set it in the finder :( I think it's somewhere off in properties or file info. This should work though: in a terminal, cd to the directory with the .py file. Then enter chmod +x convert_ASE_to_GPL.py - no quotes. Then entering ls -l should show the permissions string like: -rwxr-xr-x Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
Chris Mohler wrote: I made the plugin bit more friendly and uploaded it to the registry: http://registry.gimp.org/node/10325 I installed the script from the link above into C:\Documents and Settings\Hedley Finger\.gimp-2.6\plug-ins, right? But when Gimp is launched there is no menu path Filters-Import ASE palette... -- or has it moved. I couldn't find anything by banging around the menus. Is this still the case (no 'gimp_folder' assignment in current version of script): If you are not using GIMP from current svn, you need to change the 'gimp_folder' variable at the top of the file to match your .gimp folder. Any clues as to why I can't get it to work? I have Gimp 2.6.1. Regards, Hedley -- Hedley Finger 28 Regent Street Camberwell VIC 3124 Australia Tel. +61 3 9809 1229 Fax. (call phone first) Mob. (cell) +61 412 461 558 Email. Hedley Finger [EMAIL PROTECTED] ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
Kevin Cozens wrote: Hedley can test it and report back as to how well it works (or doesn't). Will do. I have a bunch of palettes to convert and will let you know. Regards, Hedley -- Hedley Finger 28 Regent Street Camberwell VIC 3124 Australia Tel. +61 3 9809 1229 Fax. (call phone first) Mob. (cell) +61 412 461 558 Email. Hedley Finger [EMAIL PROTECTED] ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
Hedley Finger wrote: http://registry.gimp.org/node/10325 I installed the script from the link above into C:\Documents and Settings\Hedley Finger\.gimp-2.6\plug-ins, right? But when Gimp is launched there is no menu path Filters-Import ASE palette... The file name ends in .py so you need a Python interpreter installed on your machine. If you don't see a menu entry Python-Fu under Filters, then you don't have Python on your machine. If you don't have it, I would suggest installing Active Python which can be found at: http://www.activestate.com/Products/activepython/index.mhtml -- Cheers! Kevin. http://www.ve3syb.ca/ |What are we going to do today, Borg? Owner of Elecraft K2 #2172 |Same thing we always do, Pinkutus: | Try to assimilate the world! #include disclaimer/favourite | -Pinkutus the Borg ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
On Sat, Oct 11, 2008 at 6:53 AM, Hedley Finger [EMAIL PROTECTED] wrote: Chris Mohler wrote: I made the plugin bit more friendly and uploaded it to the registry: http://registry.gimp.org/node/10325 I installed the script from the link above into C:\Documents and Settings\Hedley Finger\.gimp-2.6\plug-ins, right? But when Gimp is launched there is no menu path Filters-Import ASE palette... -- or has it moved. I couldn't find anything by banging around the menus. Is this still the case (no 'gimp_folder' assignment in current version of script): If you are not using GIMP from current svn, you need to change the 'gimp_folder' variable at the top of the file to match your .gimp folder. Any clues as to why I can't get it to work? I have Gimp 2.6.1. As Kevin mentioned, you do need python installed. I also moved the filter to the palettes menu - so click on the small arrow in t the palettes dock, then go to 'Palettes Menu' and it should show up there. I cleaned up the part about the folder - it's no longer necc. to edit the file. Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
Chris Mohler wrote: Also, once the palette is loaded (if it works :), you need to manually refresh the palette list - the new palette will appear toward the top. Just add a call to gimp-palettes-refresh. This plug-in does not handle the full ASE spec (notably RBG only) Thanks, Chris. This seems like a good start. It can always be improved later. Hopefully, Hedley can test it and report back as to how well it works (or doesn't). -- Cheers! Kevin. http://www.ve3syb.ca/ |What are we going to do today, Borg? Owner of Elecraft K2 #2172 |Same thing we always do, Pinkutus: | Try to assimilate the world! #include disclaimer/favourite | -Pinkutus the Borg ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
On Fri, Oct 10, 2008 at 1:21 PM, Kevin Cozens [EMAIL PROTECTED] wrote: Chris Mohler wrote: Also, once the palette is loaded (if it works :), you need to manually refresh the palette list - the new palette will appear toward the top. Just add a call to gimp-palettes-refresh. This plug-in does not handle the full ASE spec (notably RBG only) Thanks, Chris. This seems like a good start. It can always be improved later. Hopefully, Hedley can test it and report back as to how well it works (or doesn't). Yeah - I just found a wealth of palette functions in the PDB - including refresh. Thanks! Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
On Wed, Oct 8, 2008 at 8:26 PM, Hedley Finger [EMAIL PROTECTED] wrote: Can anybody point me to a Gimp plug-in or external utility that can convert *.ase swatch files from Adobe Kuler to Gimp *.gpl files please? I have googled until I am begoggled but can't find anything. 'Course, I could just use an eyedropper on the Kuler web page but that is not the hacker's way -- if there is a non-obvious more difficult way, that's the one to use! 8^) I made the plugin bit more friendly and uploaded it to the registry: http://registry.gimp.org/node/10325 Still only works with Kuler palettes - it will probably choke on palettes from Photoshop, AI, etc. Good news is that *all* Kuler palettes appear to be saved as RGB, so the colors translate straight into GIMP. Tested with 2.7 (svn) on Ubuntu and 2.6.1 on Win XP. If anyone can test on OS X that would be great. Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
Hedley Finger wrote: Can anybody point me to a Gimp plug-in or external utility that can convert *.ase swatch files from Adobe Kuler to Gimp *.gpl files please? If you haven't found anything using Google and there is no plug-in already available in the registry, someone will have to create a plug-in, or script file, to do the conversion. That someone will need to have access to .ase files and to the details of the format of those files. -- Cheers! Kevin. http://www.ve3syb.ca/ |What are we going to do today, Borg? Owner of Elecraft K2 #2172 |Same thing we always do, Pinkutus: | Try to assimilate the world! #include disclaimer/favourite | -Pinkutus the Borg ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Converting Adobe *.ase swatch files from Kuler to Gimp *.gpl swatch files
On Thu, Oct 9, 2008 at 9:52 AM, Kevin Cozens [EMAIL PROTECTED] wrote: Hedley Finger wrote: Can anybody point me to a Gimp plug-in or external utility that can convert *.ase swatch files from Adobe Kuler to Gimp *.gpl files please? If you haven't found anything using Google and there is no plug-in already available in the registry, someone will have to create a plug-in, or script file, to do the conversion. That someone will need to have access to .ase files and to the details of the format of those files. OK - I took a shot at a plug-in. I doubt that it works properly under Windows - I have not had time to test it (yet). Also, once the palette is loaded (if it works :), you need to manually refresh the palette list - the new palette will appear toward the top. This plug-in does not handle the full ASE spec (notably RBG only)- I doubt ASE files from sources other than Kuler will work. If you are not using GIMP from current svn, you need to change the 'gimp_folder' variable at the top of the file to match your .gimp folder. Oh yeah - it's under 'Filters-Import ASE palette...' - I need to move it somewhere more useful. There are a ton of FIXME items that I still need to attend to, but if anyone is feeling brave, I'd love feedback on it... Chris PS - (unofficial) ASE file spec is here: http://www.selapa.net/couleurs/fileformats.php #!/usr/bin/env python # Author: Chris Mohler # Copyright 2008 Chris Mohler # License: GPL v3 # GIMP plugin to convert ASE palettes to GPL palettes #FIXME - is there a way to autogenerate this? gimp_folder = .gimp-2.7 # for the target directory - change to gimp-2.6, but not gimp-2.6.1, for example from gimpfu import * import sys, os, re from struct import unpack_from, unpack home_dir = os.environ['HOME'] #FIXME - does this work on windows? pal_dir = os.path.join(home_dir, gimp_folder, palettes) #print (Palette Dir: + pal_dir) # Get file name from command line, if exists - UNTESTED if (sys.argv[1] != -gimp): this_file = sys.argv[1] print ASE file: + this_file def ase_converter(this_file): #print ASE file: + this_file # Strip of the file:/// prefix - if called by nautilus, etc if this_file.startswith('file:///'): this_file = this_file.replace('file:///', '/') try: pal_gpl = GIMP Palette\nName: # start GPL (GIMP Palette) file NUL = chr(0) # NULL byte SoH = chr(1) # Start of ASE separator byte f = open(this_file) #open ASE file ase_header = f.read(4) # first 4 bytes #print(ASE Header: + ase_header) if ase_header == ASEF: # first 4 bytes should be ASEF ase_version = f.read(4) # next 4 bytes are version - we don't need this. ase_swatches_data = f.read() # rest of the file should be swatch data #print (ASE Swatches data: + ase_swatches_data) ase_swatches = ase_swatches_data.split(SoH + NUL + NUL + NUL) # split by seperator pal_len = ase_swatches.pop(0) # This seems to be the file length - I don't think we need it pal_title_data = ase_swatches.pop(0).lstrip() #This should be the title of the palette pal_title = # check for strange characters in the palette name for c in pal_title_data: char = unpack('s', c) # Little endian string if re.match([A-Za-z0-9_\-], char[0]): pal_title += char[0] # only add if A-Z or 0-9 #print (Palette title: + pal_title) pal_gpl += pal_title + \nColumns: 1\n#\n #Finish GPL header info j = 0 for swatch in ase_swatches: j = j+1 swatch = swatch.lstrip().split( , 1) # split on the first space swatch[0] = swatch[0].replace(\x16\x00\x01\x00\x00, ) # strip funk from swatch color mode #print swatch[0] if swatch[0] == RGB: # only operate on RGB swatches red = unpack_from('f', swatch[1]) #read 4 bytes, unpack to float - little endian green = unpack_from('f', swatch[1], 4) #next 4 bytes blue = unpack_from('f', swatch[1], 8) #next 4 bytes red = (red[0] * 255) # multiply float by 255 red = int(round(red, 0)) # round to int green = (green[0] * 255) green = int(round(green, 0)) blue = (blue[0] * 255) blue = int(round(blue, 0)) #print red, green , blue # Add each swatch's RGB values to the GPL pal_gpl += str(red) + \t + str(green) + \t + str(blue) + \t + Color_ + str(j) + \n #print pal_gpl pal_file = os.path.join(pal_dir, (pal_title + .gpl)) #print pal_file pf = open(pal_file, 'w') #open palette file pf.write(pal_gpl) # write GPL data