Archive for the ‘Programming’ Category
Episode 130: Getting the Bugs out

130Download the Video! (61.2 MB, 32:10)
Download the Torrent!
Download the Companion File! (767 Bytes!)

Sorry, again a “Nerd Show”. I tackle some problems that have come up with the Python script of the last week and show my way to debug and test while making errors. My first error was to take a test case without colours – my script from last week changed all images to greyscale. Then I learn something useful about merging layers in Python.

But the top of the show is even more nerdy – the Octave plugin allows to access the Octave math software from GIMP. Caluculate your images or do a FFT with them.

The scripters crowd in the forum found a bug in GIMP, saulgoode reported it and it got fixed in a day. Take that, Adobe! ;-)

Then I try to explain why the big blobs in the image featured two shows ago are not made with GIMP but with pure physics in the camera. You can see a Blender video I made about this for #200 of Chris Marquards Tips from the Top Floor show. My part starts at about 11:40 and contains an embarrassing error. Do you get it?


This image by Nachbarnebenan is a good example for a shallow DoF.

The next show will be a simple, non-nerd walk through the post processing of an image. Promised.

The TOC

01:10 Octave Math Plugin
02:10 Number types in Python
06:00 Making a test case
06:30 Finding the wrong layer mode
08:00 Running into a wall and thinking around it
09:40 Isolate the bug
12:40 Cleaning up the code
14:40 Colour halos wit Normal Mode sharpening
16:40 When to use Octave sharpening
17:10 Basics of Photography – Depth of Field and Bokeh
19:00 Image creation with a lens
21:00 Circle of Confusion
22:30 Depth of Field
25:00 Apperture and DoF
28:30 DoF and sensor size
29:00 Dofmaster
30:00 Focal length and DoF

Creative Commons License
Meet the GIMP Video Podcast by Rolf Steinort and Philippe Demartin is licensed under a Creative Commons Attribution-Share Alike 3.0 Germany License.
Permissions beyond the scope of this license may be available at http://meetthegimp.org.

Episode 129: Octave Sharpening Python Plugin

129Download the Video! (77.0 MB, 40:31)
Download the Torrent!
Download the Companion File!

This is the second time I try to get into Python scripting for GIMP. My script in the first show about scripting was simple, just saving some clicks. Now it is more complicated, variables, loops and floating points included. But no parrots!

You find a better version of the programs in the companion file. Following a tip in our Forum I included a Undo Group. So the action can be undone, a behaviour that should have been included from the start.

I mentioned some sources. Instant Python, the official Python Tutorial and the GIMP Python reference. Bert has a script page and a much better version of the Octave sharpening script.

Then we have a UnGIMP composition challenge on the Forum.

Have I forgotten some promised links? Please complain below!

Errata:

The loop counter in the companion file is set to 6 instead of 4. You can change it back or leave it.

Perhaps it is better to take the image size from drw instead of img. See the discussion in the forum. drw.height and drw.width should work also when the layer is smaller than the image.

Creative Commons License
Meet the GIMP Video Podcast by Rolf Steinort and Philippe Demartin is licensed under a Creative Commons Attribution-Share Alike 3.0 Germany License.
Permissions beyond the scope of this license may be available at http://meetthegimp.org.

How to install Python under Windows

There is a nice 8 step tutorial about setting up Python for GIMP under Windows at gimpusers.com. We had this question here a lot.

Episode 061: Up to the Stars!
 
icon for podpress  Podcast Video (50.5MB) [34:53m]: Play Now | Play in Popup | Download
icon for podpress  Torrent: Download
icon for podpress  The image as XCF file: Download

Made by Philippe DeMartinThis week I have outsourced the show again! Philippe will take us all along to a ride to the stars – building an image like this one from scratch.

The TOC will follow when I have seen the video again – I was so absorbed that I forgot to make notes.

I promised a link for the “User Filter”, which allows to use Photoshop filters in GIMP.

Do you like this kind of GIMP usage in the show? I come from the photographic side and made this podcast according to the stuff that I can do. But with Phillippe’s help a lot more is possible. What do you think? Post your comments here!

Episode 060: Divide!
 
icon for podpress  Podcast Video (25.0MB) [26:17m]: Play Now | Play in Popup | Download
icon for podpress  Torrent: Download
icon for podpress  The images used: Download

Today I have a mixture of 3 topics for you. An other try to tackle the basics of the Zone System, a way to choose the right way through the maze of different ways to tackle a problem in Gimp and a method to counter vignetting and light falloffs with a layer in divide mode.

Before one of you comments about making vignettes: Just invert the mask and you have a vignette. ;-) Looks fine with a lot of images and John Arnold uses them all the time.

TOC

Setting display options 0:30
Zone System Philosophy 3:24
How to chose a way to tackle a problem in Gimp 10:20
Correct a vignette or light falloff 18:22
Using burn mode to emphasize colours 23:30

Creative Commons License This work is licensed under a
Creative Commons Attribution-Share Alike 2.0 Germany License.

How to install Python plugins under GIMP

Please read the comments – some important stuff may have shown up!

Linux – with GUI

Check that the packet gimp-python is installed.

Copy your .py file into the directory .gimp2.4/plug-ins . This is a hidden directory, you don’t see it in the file browser. With Nautilus you can toggle the display of the hidden files with Ctrl-H.

Then make the file executable by right clicking, selecting “Properties” from the menue and activate “Execute” in the permissions tab.

If GIMP was running, restart it.

Linux – with commandline

Check (with synaptic) that the packet gimp-python is installed.

Enter this:

cp myfile.py ~/.gimp2.4/plug-ins
chmod u+x ~/.gimp2.4/plug-ins/myfile.py

If GIMP was running, restart it.

Mac OS

Please write an instruction into the comments – I’ll pull it up to here.

Look through the comments for a solution – but I think there must be a better one.

EDIT by monoceros84: There is a new discussion going on in the forum. Have a look at: http://forum.meetthegimp.org/index.php/topic,227.0

Windows

Copy the files to ~/.gimp2.4/plug-ins

With the following prerequisites:

- PyGTK, PyCairo and PyGobject (all available from the GNOME FTP mirrors as installers) are installed prior to installing GIMP
- ~ is %USERPROFILE%

If GIMP was running, restart it.

Why Python?

I got this mail from Marc (posted with permission):

Rolf writes in his blog:

> I need help with learning enough Python to write scripts for GIMP.
> Do you know a good site or other ressource? Mail me!

Why Python? I played with that language many years ago. I don’t remember anything special that would make me want to use it over the scheme based scripting language.

Example, here’s a script to increase contrast in an image, written shortly after I saw you do it in one of podcasts :-) It copies the current layer twice naming them “pop” and “pop-ovly” then sets the mode of pop-ovly to overlay (5) and the opacity to 50 percent. That’s it. I can then adjust the opacity for the amount of “pop” I want and then do a merge-down leaving me with a layer “pop” that has the adjustment.

following are two scripts, an analysis and the same script in Python. Boring for some….
(more…)