GIMP Chat http://gimpchat.com/ |
|
Help with plug-in-displace and plug-in-colors-channel-mixer http://gimpchat.com/viewtopic.php?f=9&t=3021 |
Page 1 of 1 |
Author: | InkyDinky [ Mon Nov 07, 2011 1:15 pm ] | ||
Post subject: | Help with plug-in-displace and plug-in-colors-channel-mixer | ||
I'm trying to write a plugin that will create red-cyan anaglyphs from an image and a depth map (as well as learn how to write Gimp scripts). The things that are broken are the non-interactive use of the displace plugin and the channel mixer. I get a 'vector-ref out of bounds' error for the displacement plugin. For the channel mixer instead of layer's channel being changed somehow it acts as if the layer is all white and changes the channels for that. (Although at one point I think it was working properly..but I can't get it back to behaving.) Code: Select all (define (script-fu-anaglyph theImage drawable) I'm new to scripting so please be gentle. I've looked at the tutorials and they aren't much help for my problems. Any help is greatly appreciated. Running GIMP 2.6.11 Thanks!
|
Author: | Rod [ Mon Nov 07, 2011 2:24 pm ] |
Post subject: | Re: Help with plug-in-displace and plug-in-colors-channel-mixer |
Shouldn't x and y displacement be 10.00 ? Channel mixer i am not sure of. |
Author: | saulgoode [ Mon Nov 07, 2011 2:33 pm ] |
Post subject: | Re: Help with plug-in-displace and plug-in-colors-channel-mixer |
Try removing the backslash and either joining the two lines or inserting a semi-colon to comment the second line. |
Author: | InkyDinky [ Mon Nov 07, 2011 2:43 pm ] |
Post subject: | Re: Help with plug-in-displace and plug-in-colors-channel-mixer |
Nope we only want to displace X. Think of your eyes. They are a stereo pair. They have a X offset but not a Y offset. |
Author: | Rod [ Mon Nov 07, 2011 3:15 pm ] |
Post subject: | Re: Help with plug-in-displace and plug-in-colors-channel-mixer |
saulgoode wrote: Try removing the backslash and either joining the two lines or inserting a semi-colon to comment the second line. Saul would you mind explaining what you mean by "backslash" ? Thanks. |
Author: | InkyDinky [ Mon Nov 07, 2011 3:32 pm ] |
Post subject: | Re: Help with plug-in-displace and plug-in-colors-channel-mixer |
I edited the code that is displayed in the code block that I think he was referring to. When I pasted from my editor it inserted the / for the line break. |
Author: | Rod [ Mon Nov 07, 2011 3:36 pm ] |
Post subject: | Re: Help with plug-in-displace and plug-in-colors-channel-mixer |
Ahh okay, thanks. ![]() Welcome to Gimp Chat by the way. |
Author: | InkyDinky [ Mon Nov 07, 2011 11:01 pm ] | |||
Post subject: | Re: Help with plug-in-displace and plug-in-colors-channel-mixer | |||
Well I have a working script. I didn't solve the channel-mixer problem. The documentation isn't clear as to what the "gain" does for the color. I had to work around this problem. And as far as the displace plugin I had to set the do-x and do-y options to 1 otherwise it wouldn't work. Here is my working script and a sample image to play with. The images work best with a depth map from 0-127 and not 0-255 And BTW the cartestion/polar option doesn't do anything in the pop up menu. Enjoy and happy anaglyphing!
|
Author: | saulgoode [ Tue Nov 08, 2011 1:01 am ] |
Post subject: | Re: Help with plug-in-displace and plug-in-colors-channel-mixer |
InkyDinky wrote: Well I have a working script. I didn't solve the channel-mixer problem. The documentation isn't clear as to what the "gain" does for the color. The gain values of the PDB function are multiplication factors, not the percentage values expected by the dialog interface. For example, to convert a layer to grayscale luminance using CIE Rec. 709 weighting (0.2126*R + 0.7152*G + 0.0722*B), you would use: Code: Select all (plug-in-colors-channel-mixer RUN-NONINTERACTIVE image layer FALSE or to extract the green channel only: Code: Select all (plug-in-colors-channel-mixer RUN-NONINTERACTIVE image layer FALSE |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |