GIMP Chat
http://gimpchat.com/

Ghost Diagrams Python Script.
http://gimpchat.com/viewtopic.php?f=9&t=1280
Page 2 of 3

Author:  Rod [ Mon Mar 07, 2011 1:31 pm ]
Post subject:  Re: Ghost Diagrams Python Script.

That's a good idea Mahvin.

Author:  lylejk [ Mon Mar 07, 2011 5:50 pm ]
Post subject:  Re: Ghost Diagrams Python Script.

OK Rod. I don't have GIMP Portable. Did consolidate all the dlls and the Python script into it's own directory and tried to double-click on the Python script, but get a quick DOS menu then it disappears. I'm downloading GIMP Portable just in case it requires that too. I'll edit this (or add) if success or failure afterwards (only getting 70K/s download speed so it's taking a few more minutes then I would like). :)

edit:

I didn't realize you still had to install GIMP Portable before you can use it. I'll just stick with the GIMP launch thingy that I did when I started this thread. :)

edit:

OK; Kevin's version does work and can be called in GIMP with all the caveats that Rod mentioned. Still cool though. Thanks Kevin. :)

Author:  Rod [ Mon Mar 07, 2011 6:37 pm ]
Post subject:  Re: Ghost Diagrams Python Script.

You shouldn't need gimp portable, as i do not have it.
If it is opening a quick dos window and closing again it means you don't have all the required dll files in the folder with the python file.Are you sure you placed all the dll's i posted earlier in there?

Author:  mahvin [ Mon Mar 07, 2011 6:42 pm ]
Post subject:  Re: Ghost Diagrams Python Script.

It runs pretty good in Linux as a standalone, the only problem I have is the random button doesn't seem to work (all the time). This is the error:

/home/mahvin/Ghost Diagram/ghost-diagrams-0.8.py:1050: DeprecationWarning: catching of string exceptions is deprecated
  except "repeat":
Traceback (most recent call last):
  File "/home/mahvin/Ghost Diagram/ghost-diagrams-0.8.py", line 613, in <lambda>
    random_button.connect('clicked', lambda widget: self.random())
  File "/home/mahvin/Ghost Diagram/ghost-diagrams-0.8.py", line 1047, in random
    if a in all and b not in all: raise "repeat"
TypeError: exceptions must be old-style classes or derived from BaseException, not str


A couple of new interesting presets to add to your list:

"'212121', ' 1 2 '",
"'F Aa ', 'c Aa '",

Author:  lylejk [ Mon Mar 07, 2011 7:53 pm ]
Post subject:  Re: Ghost Diagrams Python Script.

Rod wrote:
You shouldn't need gimp portable, as i do not have it.
If it is opening a quick dos window and closing again it means you don't have all the required dll files in the folder with the python file.Are you sure you placed all the dll's i posted earlier in there?


I triple checked Rod. No problem anyway since Kevin's edit works. I just wish it would output seamless textures but too chicken (and lazy) to email Paul (busy he must be) to add that capability. :)

Author:  mahvin [ Mon Mar 07, 2011 8:18 pm ]
Post subject:  Re: Ghost Diagrams Python Script.

I emailed him, (never hurts to ask).

Author:  Rod [ Tue Mar 08, 2011 4:46 pm ]
Post subject:  Re: Ghost Diagrams Python Script.

No it doesn't! :)

Author:  lylejk [ Wed Mar 09, 2011 8:42 am ]
Post subject:  Re: Ghost Diagrams Python Script.

Sorry for opening this up again. lol

Just found another cool preset ('cCc C '). Even harder to make it seamless (but I did). Of course I used the Python version since I like the inside line effect. Then the hard part (made it seamless). Click on the image for it's Deviant (yup; another SSP; lol). :)

Image

edit:

Also another (yes, it's seamless. It's based on 'aA aA '); decided to host this one here, but still an SSP. ;)

:)

Attachments:
lattice.png
lattice.png [ 33.71 KiB | Viewed 2023 times ]

Author:  mahvin [ Thu Mar 10, 2011 1:15 am ]
Post subject:  Re: Ghost Diagrams Python Script.

I don't know why, but presets I find in the javascript version don't play nice in the Python version. How weird is that?

Author:  lylejk [ Thu Mar 10, 2011 1:30 am ]
Post subject:  Re: Ghost Diagrams Python Script.

Yeah; and you get different results. I think, based on reading the 70MByte thesis he posted, that the XHTML version is closest to what he wanted the result to be. :)

Author:  mahvin [ Thu Mar 10, 2011 1:40 am ]
Post subject:  Re: Ghost Diagrams Python Script.

Right, and it looks better, but without the knots (which I personally prefer).

Author:  mahvin [ Fri Mar 11, 2011 1:48 am ]
Post subject:  Re: Ghost Diagrams Python Script.

I don't know if any of you have paid much attention to the ability to change the colors of your ghost diagrams. It works best by placing your hexadecimal code directly before a ', see the example below:

Take this:

'1B1B', 'a A ', ' bA ', 'ab B'

and do this:

'1B1B/#fff', 'a A /#fff', ' bA /#000', 'ab B/#fff'

Note: you can use the html notation of any 6 alphanumeric (#e4d56b), for colors. The above example is just the short version for black and white, but you can use html notation. Just make sure the "/#000 immediately precedes the CLOSING ' I tried using it before the opening ' and it doesn't work.

Author:  lylejk [ Fri Mar 11, 2011 2:07 am ]
Post subject:  Re: Ghost Diagrams Python Script.

Cool; works for the python script but not the XHTML for whatever reason. :)

Author:  mahvin [ Fri Mar 11, 2011 2:22 am ]
Post subject:  Re: Ghost Diagrams Python Script.

If there are any differences in presets on the javascript version, just copy and paste the preset into the python version and then change the colors. I haven't really looked to see if any were different on the separate versions.

You can even declare grids, borders, and thicknesses (I got some pretty cool grids from this):

grid=0, border=0, thickness=0.3

Author:  PhotoComix [ Fri Mar 11, 2011 3:59 am ]
Post subject:  Re: Ghost Diagrams Python Script.

mahvin wrote:
Word to the wise:

Instead of saving the javascript version as a desktop link (that may one day disappear from the internet) save it as a file. But make sure you save the "entire content" of the xhtml (do not save it as a link). And do not save the file just by clicking "save file as", as sometimes it fails to associate the web content according to the actual source information in the xhtml, and running it sometimes will fail. Instead, (using Firefox: recommended) open the source page, select Edit - All, then save the copy of the source to your folder (you can keep the same name for it, if you want). And now you will have a standalone javascript version to use and not have to worry about the website going down or going away.



this is a good tip and not only for this app

Author:  Rod [ Fri Mar 11, 2011 11:24 am ]
Post subject:  Re: Ghost Diagrams Python Script.

Thanks Mahvin for the tips.

Author:  lylejk [ Sat Mar 12, 2011 12:57 am ]
Post subject:  Re: Ghost Diagrams Python Script.

OK Rod. I had a few minutes so I went looked at the issue again. I first copied the python script in the GIMP bin folder and low and behold, it worked great. I decided to do pretty much what you did and found the files needed and I needed more files then you did for whatever reason. Now I wonder if I can give the save as svg option as opposed to save as PNG. Might take a look at the code and replace the libpng with the libsvg and see what happens. Not sure if it is as easy as this though. :)

Attachments:
whatineeded.png
whatineeded.png [ 77.45 KiB | Viewed 1878 times ]

Author:  lylejk [ Sat Mar 12, 2011 1:09 am ]
Post subject:  Re: Ghost Diagrams Python Script.

Well I tried to copy both libsvg.dll and librsvg-2-2.dll after replacing all the png entries with svg entries in the python script, but I get this error. Guess I'm SOL. lol

:)

Attachments:
sol.png
sol.png [ 42.63 KiB | Viewed 1877 times ]

Author:  mahvin [ Sat Mar 12, 2011 1:51 am ]
Post subject:  Re: Ghost Diagrams Python Script.

This build of gdk-pixbuf does not support saving the image format, svg

We need the svg-gdk-pixbuf-loader version, but I am not sure how to implement that into this python file.

I am tempted to call up the "export as svg" plug-in and see what happens.

Author:  lylejk [ Sat Mar 12, 2011 1:58 am ]
Post subject:  Re: Ghost Diagrams Python Script.

Again, hacker I'm not and am not aware of all the "skin a cat" methods, but if you do get it to work Mahvin, I would appreciate it if you share. At least I now can run it without GIMP (Rod told how; weird I had to add the additional files for mine to work). :)

Page 2 of 3 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/