Post Reply 

batch despeckle

Feb 6, 2012, 11:13
Post: #1
batch despeckle
Hi,
I'd like to get gimp to despeckle all images of one folder, with the options adaptive, recursive, Radius = 3, black level = -1 und white level = 256), afterwards save the images to another folder. Unfortunately I'm no programmer und don't get the tutorials to write a batch skript.
I know it should be

gimp -i -b '(skript "*.png" 1 2)' -b '(gimp-quit 0)'

[instead of 'skript' the despeckle funktion], but how to write it? And where to run the skript? In the folder, containing the gimp exe?

I'm thankful for any kind of help!

kkiel
Find all posts by this user
Quote this message in a reply
Feb 7, 2012, 08:29
Post: #2
RE: batch despeckle
Thanks Kevin!

I use windows and don't have python on my PC.
There already is a despeckle plugin on e can find in the skript-fu repository. That works fine for me from the gimp GUI. I now only need to run it in batch mode. Maybe it isn't necessary to programm something new but to simply get it run from the command line? But how?
Thanks for any help!

kkiel
Find all posts by this user
Quote this message in a reply
Feb 8, 2012, 15:03
Post: #3
RE: batch despeckle
Hi Kevin,

this looks great (in notepad), thank you very very much! I'll test it this evening (after doing some backups ...) and tell you how it went.

Thank you very much again,

kkiel
Find all posts by this user
Quote this message in a reply
Feb 8, 2012, 20:06 (This post was last modified: Feb 8, 2012 20:07 by kkiel.)
Post: #4
RE: batch despeckle
Hi Kevin,
I copied the .scm-file into the gimp skripts folder, opend skript-fu via the filter menu, clicked refresh
skripts afterwards, but it doesn't show up in the skripts list. Was this the wrong way to deal with it?
Then, I don't get from where to start the DOS batch file. Where are the image files expected to be?
Thanks a lot!
kkiel
Find all posts by this user
Quote this message in a reply
Feb 9, 2012, 07:33
Post: #5
RE: batch despeckle
Hi Kevin,

since the skript was an scm, not an exe, I thought it should be started from gimp. Anyway - your skript runs smoothly! I really am thankful, this saves me weeks of work!

kkiel
Find all posts by this user
Quote this message in a reply
Feb 19, 2012, 11:45
Post: #6
batch despeckle and meta-data
Hi Kevin and other readers looking for a solution for the despeckle problem:

The skript still works fine and the despeckling effect is just what I need, but Gimp destroys the iptc-data and maybe some other metadata (icc profile). My despeckled images wont show up in Lightroom and Faststone, though other readers (irfanview, imatch, xnview) don't have problems .
So I won't be able to use it like that. Does anybody know how to avoid that? Is it another line of code in the skript? There must be some metadata skripts in Gimp.
Thanks for any help!

kkiel
Find all posts by this user
Quote this message in a reply
Feb 19, 2012, 15:02
Post: #7
RE: batch despeckle
Hi Ofnuts,

thank you for your prompt reply. My images are saved as tif, lzw-compressed, grayscale mode. I thus changed the command line in the dos batch file.
Are there other ways I messed the meta-data up?

Thank you!

kkiel
Find all posts by this user
Quote this message in a reply
Feb 20, 2012, 09:58
Post: #8
RE: batch despeckle
Hi paynekj,

I can afford to loose the IPTC-data because I can easily write them back with IMatch but what bothers me is that the images wont show up as a Lightroomthumbnail before importing ('no preview available') and as a Faststone thumbnail (thumbnails turn black). After importing to Lightroom though they are visible and Faststone will process the images further (lzw-compressing for example) without problems (though lightroom will have problems to show the previews of those before importing). I just want to make sure that standard image viewers will be able to cope with my images and that no seminal image information (icc profile, whatever) got lost.
So I will do some more checking before despeckling thousands of images ...
Thanks for your help!

kkiel
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Batch create images from array edmilner 1 549 Jul 17, 2017 16:41
Last Post: ythgilb
  How to close gimp with batch command? flixe 1 546 Jun 19, 2017 12:29
Last Post: ythgilb
  Bashing my head - Batch Python Script nmiltner 1 670 Sep 5, 2014 00:58
Last Post: nmiltner
  Batch processing script Help jarboe3142 1 587 Jun 1, 2014 18:45
Last Post: rich2005
  GIMP batch process script run-time error Paddy Landau 2 1,287 Apr 8, 2014 20:33
Last Post: Paddy Landau

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS