Old Blog Posts
Handy if you are scanning in a lot of images and you just want to export them all in one go. It is based on a script by Saul Goode, extended to prompt for image base name, directory etc.
Save it as saveall.scm in your Gimp scripts directory. E.g. ~/.gimp-2.8/scripts/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; This program is free software; you
; can redistribute it and/or modify ; it under the terms of the GNU
; General Public License as published ; by the Free Software Foundation;
; either version 2 of the License, or ; (at your option) any later version. ; ; This program is distributed in the
; hope that it will be useful, ; but WITHOUT ANY WARRANTY;
; without even the implied warranty of ; MERCHANTABILITY or FITNESS
; FOR A PARTICULAR PURPOSE.
; See the GNU General Public License
; for more details. (define (script-fu-save-all-images inDir inSaveType
inFileName inFileNumber) (let* ( (i (car (gimp-image-list))) (ii (car (gimp-image-list))) (image) (newFileName "") (saveString "") (pathchar (if (equal?
(substring gimp-dir 0 1) "/") "/" "\\")) ) (set! saveString (cond (( equal? inSaveType 0 ) ".jpg" ) (( equal? inSaveType 1 ) ".bmp" ) (( equal? inSaveType 2 ) ".png" ) (( equal? inSaveType 3 ) ".tif" ) ) ) (while (> i 0) (set! image (vector-ref (cadr (gimp-image-list)) (- i 1))) (set! newFileName (string-append inDir
pathchar inFileName (substring "00000" (string-length
(number->string (+ inFileNumber i)))) (number->string (+ inFileNumber i)) saveString)) (gimp-file-save RUN-NONINTERACTIVE image (car (gimp-image-get-active-layer image)) newFileName newFileName ) (gimp-image-clean-all image) (set! i (- i 1)) ) ) ) (script-fu-register "script-fu-save-all-images" "/File/Save ALL As" "Save all opened images as ..." "Lauchlin Wilkinson (& Saul Goode)" "Lauchlin Wilkinson (& Saul Goode)" "2014/04/21" "" SF-DIRNAME "Save Directory" "" SF-OPTION "Save File Type" (list "jpg" "bmp" "png" "tif") SF-STRING "Save File Base Name" "IMAGE" SF-ADJUSTMENT "Save File Start Number"
(list 0 0 9000 1 100 0 SF-SPINNER) )
I don’t delude myself by calling myself a Java guru, let alone an expert, but occasionally I am reminded of something that just makes me really realise how much of a noob I can be. Take for example the For-Each construct. For as long as I can remember I’ve been using the following pattern for creating a simple loop through a collection.
for (Iterator<TimerTask> i = c.iterator(); i.hasNext(); )
Today however my IDE handily popped up a hint asking if I wanted convert my simple loop to a for-each loop like so:
for (TimerTask t : c)
It is so much more beautiful, and when you read “:” as “in” it should be easy to remember. ”For each TimerTask t in c do…”.
I’m afraid of writing (on the Internet) mostly because I’m afraid of saying something stupid or something I’ll regret later in life. I know I wasn’t always this afraid, and I’ve got the stupid things I’ve said on the Internet to prove it. I used to be quite gung-ho about writing and asking stupid questions but now I just look back and cringe, and it blocks me all up. This fear of writing has now extended past just being a fear of writing on the Internet, but a fear of writing anywhere there is going to be an audience. Apparently I’m not alone in this however. A work colleague continually says I undersell my work, and my writing ability, and that I should try harder to “sell” it. Sometimes I just feel like they are saying that to make me feel better tho.
So, how am I working to combat these fears? Well, first off I address the notion that my work and writing ability is no good by saying to myself. ”Lauchlin, my work colleague is far more experience than I am, has much more experience writing and publishing that I have, and if they say I am ok at writing, and that my ideas are good, then I am insulting them by questioning their opinion.” It doesn’t always help, and it doesn’t take away all the fear. But it nails that particular monster on the head.
The next thing I say to myself is, “Lauchlin, past you is not now you”. Sure, I’ve made mistakes, said and written stupid stuff, but hopefully I’ve learnt from some of it. I’ll make some of the same mistakes again, and I’ll make new mistakes in the future.
Between these two strategies, I’m starting to feel less blocked up about writing. My next strategy to try is to just try and write more. At least 100 words a day. It might not be online, it might just be an e-mail, a note on some paper, or a few lines in the paper I’m trying to write with my colleague, but it has to be 100 words. Future Lauchlin, wish me luck with it.
I’ve been listening to Ufomammut (from Italy) a while now and I have to say that Idolum is quickly becoming one of my favourite albums. The droning repetitive sounds and abstract vocals have a haunting quality to them that seem to echo from the distant, primal past while still reverberating in to a slightly disturbing and sometimes dark future. Despite these dark overtones there is still an occasional sense of brightness and optimism in some of the tracks with the vocals and harmonics infrequently lifting in vibrancy. The tracks are both enjoyable as a concious listening exercise, following the slowly undulating progressions or just as a great accompaniment to a pensive train ride or walk.