Re: [Gimp-user] Script-Fu Exceptions and errors
Thomas DuBuisson (thomas.dubuis...@gmail.com) wrote: - CODE -- (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE image.png image.png))) (layer0 (car (gimp-image-get-active-layer image))) ) (let* ((layer1 (car (gimp-image-flatten image (gimp-layer-set-mode layer1 25) ) (let* ((layer1 (car (gimp-layer-new-from-drawable layer0 image ... - END CODE -- As you already found out, flattening the image makes its layers invalid, this is because it generates a new one, which it returns as result. As you can see in my re-indented version of your code, you use let* to bind the newly created layer to the layer1 variable, yet you forget it too early, since you need to use it for the gimp-layer-new-from-drawable. I don't like how you nest the various let*-statements. That makes the code hard to track. It would be better if you have some dummy variable declarations in your outer let*-statement and then use set! to redefine the values. Something like this: (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE image.png image.png))) (layer0 (car (gimp-image-get-active-layer image))) (layer1 0) ) (set! layer0 (car (gimp-image-flatten image))) (gimp-layer-set-mode layer0 25) (set! layer1 (car (gimp-layer-new-from-drawable layer0 image))) ... Also note that the use of 25 for the mode is not nice, you really should use the symbolic constants. 3) C Assertation failures Perhaps most concerning are the assertation failures. Presumably, these are not supposed to happen. How concerned should I be? [...] (gimp-console:2987): Gimp-Core-CRITICAL **: gimp_image_remove_layer: assertion `gimp_container_have (image-layers, GIMP_OBJECT (layer))' failed You should be concerned moderately, since your code apparently is doing some bogus stuff and does not properly keep track of the layers in the image. However, the critical warning should not happen, we really should catch these errors in the PDB wrappers already. Hope this helps, Simon -- si...@budig.de http://simon.budig.de/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Select the layer I click on
Hello, I have a GIMP project with more than 200 layers and since there are no layer groups (I can't remember the GIMP terminology for it) it's quite cumbersome to find the layer I'm looking for in the layer box. Is there any tool in GIMP for selecting (making active) the layer that I'm clicking? Thanks, Deniz Dogan ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Forcing GIMP to use English
I'm running GIMP on a Windows Vista machine which uses a Swedish locale (but it's in fact an English Vista installation). Now I'm trying to figure out if I can force GIMP to use English and thereby overriding my Windows settings. Is there any such functionality? Thanks, Deniz Dogan ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Forcing GIMP to use English
I cannot say about vista, but with xp I have just created a new variable at system level (control panel-system-advanced options-env variables) called 'LANG' with value 'en'. That does the trick. HIH Jaims Deniz Dogan wrote: I'm running GIMP on a Windows Vista machine which uses a Swedish locale (but it's in fact an English Vista installation). Now I'm trying to figure out if I can force GIMP to use English and thereby overriding my Windows settings. Is there any such functionality? Thanks, Deniz Dogan ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Forcing GIMP to use English
2009/11/25 Jaime Seuma jaims.se...@gmail.com: I cannot say about vista, but with xp I have just created a new variable at system level (control panel-system-advanced options-env variables) called 'LANG' with value 'en'. That does the trick. HIH Jaims Thanks, that did work! -- Deniz Dogan ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] creating a texture
Hi, for...@gimpusers.com (2009-11-24 at 2113.32 +0100): hello there i am a blender user i i wanted to create a texture for bumomap/normal map in gimp i tryed the noise filter but this is not what i need You have to combine it with other things. ;] i am modeling a camera see camera real image here http://www.kenrockwell.com/nikon/d40/images/d40-18-55mm-top-big.jpg u can see that the camera material have little bumps with different shapes in each little bump how can i generate a texture like this in gimp You can probably do it in Blender too, using clouds texture, custom colour gradients, etc. But in Gimp: - new white image. - rgb noise filter, move sliders to max so you get lots of dots. - desaturate (lightness one is fine, try others if you want). - blur (normal one will do here). - curves, make a _/ curve , the histogram should show a sharp spike on the right side like /\, I placed the curve parallel to the left side of spike (x 162, y 0 and x 183, y 255, approx). This leaves you with some random black spots. - guassian blur, 1-2 pixels to smooth. - invert if you need the bump map that way. As last note, I decided the dot density was too low, so before invert I duplicated the layer, offset it, and put it in multiply mode. Next would be making the result tileable (plenty of tutorials about this, most just forget that you should use offset multiple times different values, otherwise you will have zones that are hard to touch up). GSR )-: no luck there doing that for start noise was creating noise with different colors on curves , changing the line _/ wont effect the histogram on the background any way i can share my result on this page ? sotty i am no expert on gimp -- shay t. (via www.gimpusers.com) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Select the layer I click on
Deniz, Your question sounds very much like a question that was asked recently on this mailing list. See https://lists.xcf.berkeley.edu/lists/gimp-user/2009-November/016022.html BTW, layer groups is something the GIMP developers are working on. Expect this in GIMP 2.8 (and in the current GIMP 2.7 development branch). See www.gimpusers.com/news/2009-09-06/layer-groups-gimp-2-8-preview-update.html Kind regards, Martijn http://gimp.startpagina.nl ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Select the layer I click on
2009/11/25 Martijn Weisbeek weisb...@gmail.com: Deniz, Your question sounds very much like a question that was asked recently on this mailing list. See https://lists.xcf.berkeley.edu/lists/gimp-user/2009-November/016022.html BTW, layer groups is something the GIMP developers are working on. Expect this in GIMP 2.8 (and in the current GIMP 2.7 development branch). See www.gimpusers.com/news/2009-09-06/layer-groups-gimp-2-8-preview-update.html Kind regards, Martijn http://gimp.startpagina.nl Thank you! Sorry for not searching before asking. If anyone else finds this post looking for an answer to this question, the answer is something like this: The default behavior of the move tool is to move the layer you click. You can change this by doing this: Go to: Edit - Preferences - Tool options Check Set layer or path as active under the Move Tool section. It seems like there is no way to toggle this behavior by e.g. holding key. You'd think that holding the shift key would toggle the behavior, which the description in the toolbox implies. However, I can't get this to work! -- Deniz Dogan ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Script-Fu Exceptions and errors
I don't like how you nest the various let*-statements. That makes the code hard to track. It would be better if you have some dummy variable declarations in your outer let*-statement and then use set! to redefine the values. Also note that the use of 25 for the mode is not nice, you really should use the symbolic constants. These issues are because my code is randomly generated using a Script-fu syntax tree I wrote. I'll add indentation to the AST/Script-fu compiler and that should make things easier to read. Not sure how to handle the side-effects of flattening, I'll think on it more. You should be concerned moderately, since your code apparently is doing some bogus stuff and does not properly keep track of the layers in the image. However, the critical warning should not happen, we really should catch these errors in the PDB wrappers already. It's a little more concerning to me that I found 1 infinite loop that nearly crashed my system (took a while to register, but I finally killed gimp-console) and several memory bugs where a gimp plugin requests gigabytes of memory (and then fails). Also, values aren't garbage collected after fails scripts thus my constant testing lead to a gimp-console taking nearly all of my 4GB of RAM; this forced me to stop using GIMP for the project. After I finish with this project I'd be happy to re-generate some of the buggy scripts and post to the developers list if you'd like - somewhat like BNF fuzzing script-fu :-) Thanks Simon, Thomas ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] creating a texture
also i like to have a big distance from each bump everything i try is to close Hi, for...@gimpusers.com (2009-11-24 at 2113.32 +0100): hello there i am a blender user i i wanted to create a texture for bumomap/normal map in gimp i tryed the noise filter but this is not what i need You have to combine it with other things. ;] i am modeling a camera see camera real image here http://www.kenrockwell.com/nikon/d40/images/d40-18-55mm-top-big.jpg u can see that the camera material have little bumps with different shapes in each little bump how can i generate a texture like this in gimp You can probably do it in Blender too, using clouds texture, custom colour gradients, etc. But in Gimp: - new white image. - rgb noise filter, move sliders to max so you get lots of dots. - desaturate (lightness one is fine, try others if you want). - blur (normal one will do here). - curves, make a _/ curve , the histogram should show a sharp spike on the right side like /\, I placed the curve parallel to the left side of spike (x 162, y 0 and x 183, y 255, approx). This leaves you with some random black spots. - guassian blur, 1-2 pixels to smooth. - invert if you need the bump map that way. As last note, I decided the dot density was too low, so before invert I duplicated the layer, offset it, and put it in multiply mode. Next would be making the result tileable (plenty of tutorials about this, most just forget that you should use offset multiple times different values, otherwise you will have zones that are hard to touch up). GSR )-: no luck there doing that for start noise was creating noise with different colors on curves , changing the line _/ wont effect the histogram on the background any way i can share my result on this page ? sotty i am no expert on gimp -- shay t. (via www.gimpusers.com) ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Select the layer I click on
Hi, deniz.a.m.do...@gmail.com (2009-11-25 at 1613.28 +0100): It seems like there is no way to toggle this behavior by e.g. holding key. You'd think that holding the shift key would toggle the behavior, which the description in the toolbox implies. However, I can't get this to work! I gave it a look again (*) and when tool options say move you will move the layer that is active in layers dialog when you drag, no matter where you click. If it says pick you will activate topmost opaque layer and then move it when you drag. Shift key changes the button temporally. Try it, press and release it and see how the tool options update... at least here it does... if not, you found a bug. The preferences option just decides about keeping or not the activation. You can see the temp activation in layers dialog while the mouse button is hold. Leave preferences open to one side of the monitor and see how things behave with an image with 2 transparent layers with a small doodle in each, try pref on/off, shift pressed, etc. *: Three notes about why I forget all the details of this. First is that I have the make active pref enabled to match old Gimps and always forget about it. It can be weird for new people, but so is that move's default includes pick (it is named move, not select/pick and move... so before and now are not free of sins). Second is that I never change these tool options from the default settings, so I do not have to look at them ever; my fingers always know. Nevermind in some cases the keys are not toggles, in move tool shift is, but try selecting layer, selection and path modes and see what control or alt do in each case... the only that seems sane to me is to leave it in layers, so all three keys can do things and my fingers can continue in automatic mode. And third is that I stopped believing in texts, instead I see what things do, so my hands learn that and my eyes completly ignore the texts. Small redesign: the tool options should be something like Move top opaque layer under cursor for pick and Move active layer for move. There must be better wording that current. As Joao mentioned, the keep active or not pref could be a tool option, dependant on Move top opaque layer under cursor and with a text like Make active. Things could be moved but with the intent of leaving the settings in sane state (some of us would had to relearn shift key, but I think it could be settled forever). Example: () Move active layer () Pick top opaque then move --, pick enables/gives access to [] Keep picked as active-` keep toggle (otherwise greyed) GSR ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] creating a texture
Hi, for...@gimpusers.com (2009-11-25 at 1505.33 +0100): for start noise was creating noise with different colors Yes, that is right, because desaturate gives you the white to black version. You have to follow all the steps, even if at first it looks bad. ;] I made a quick visual tutorial so you can see how things change: http://www.infernal-iceberg.com/gimp/tmp/camera-texture-tutorial.png on curves , changing the line _/ wont effect the histogram on the background The histogram stays as is while you move the dots. I just used it as reference to place the curve. If you use the x and y info that appears when you drag the controls of the curve, you get good references too. But the best is to check what the image shows, the values I gave are only examples, it depends with the result you want. any way i can share my result on this page ? For PNGs or JPGs, you can use one of those image hosting sites (imageshack, tinypic, etc). If you used the mail list method instead of gimpusers gateway, I think you can even send small attachments. GSR ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Reopening old/deleted Gimp files
I am using GIMP 2.6.6 on a Mac OS 10.4.11. I have used the program since early 2009. I am wondering if it's possible to open old GIMP documents that don't appear under Document History. The images (JPEG files) I would like to open have been deleted from my computer, but it seems logical that GIMP would retain them, since I have worked with them in GIMP before. Is there a way I can recover these files? Thanks. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] ???
I just got GIMP for Mac and in installing it says no because I need X-11. What is that? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] ???
Rob Meurer wrote: I just got GIMP for Mac and in installing it says no because I need X-11. What is that? The X Window System server for Mac OS X: http://support.apple.com/downloads/X11_for_Mac_OS_X_1_0 You should be able to install X from your Mac OS X install DVD. Peace... Tom ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Reopening old/deleted Gimp files
Charlie, Why would GIMP retain these images? Just because you have used GIMP to edit them? Images might be in GIMP's recently used list, but if you try to open them from there when you have deleted them from their original location than you will still get an error message. If you have deleted the images from your computer you might be able to recover them by using some file recovery software. When you are on Windows this software comes to my mind: www.piriform.com/recuva However, each operating system has one or more (free) recovery programs available. Kind regards, Martijn http://gimp.startpagina.nl ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user