[Gimp-user] Increasing pixel size
I have an old 7 mp image that I'm trying to increase to around 10MP. I've read it's best to increase by 10%, then unsharpen, and repeat process until you get to the desired result. I unsharpened with radius at 5, threshold 15, and amount .5. When I finished the process. I viewed the image at 100% and it was terrible. Any recommendations regarding the process or the unsharpened mask settings? Thanks. -- Byram (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] Script-Fu for batch image conversion
Quoting Dillon : > Sorry for being unclear - when I said "this line" I was referring to: > > (set! num-layers (car (gimp-image-get-layers newimage))) > > > On Sat, Jul 24, 2010 at 9:50 AM, Dillon wrote: >> Here is the code: >> : >> : >> (set! newimage (car (gimp-file-load RUN-NONINTERACTIVE filename >> filename))) >> (set! num-layers (car (gimp-image-get-layers newimage))) >> : >> : The error is most likely owing to a failure of the file to load properly. Try running the command: (batch-save-as-xcf pattern) in the Script-fu console (provide the full path to a TIFF file as 'pattern'). ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Gimp-user Digest, Vol 94, Issue 25
Is that really a "must" ? It turns out I was missing variable declarations, but I have never provided initial values when declaring variables in a let block, and that doesn't seem to cause issues. I'll experiment. On Sat, Jul 24, 2010 at 9:39 AM, wrote: Message: 2 > Date: Sat, 24 Jul 2010 11:45:24 -0400 > From: Kevin Cozens > Subject: Re: [Gimp-user] Script-Fu for batch image conversion > To: gimp-user > Message-ID: <4c4b0a94.7010...@ve3syb.ca> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Dillon wrote: > > (set! num-layers (car (gimp-image-get-layers newimage))) > > (set! layerIDs (cadr (gimp-image-get-layers newimage))) > > What error messages do you get when the above lines are included? > > > (define (batch-save-as-xcf pattern) > > (let* ( > > (filelist (cadr (file-glob pattern 1))) > > (fileparts) > > (xcfname) > > (filename) > > (image) > > (newimage) > > (drawable) > > ) > > The declarations for variables "fileparts" through to "drawable" are wrong. > You must provide an initial value when defining a variable in a let block. > > The simple solution is to add a 0 or -1 to the declarations for numeric > variables and "" string variables. Any value will work but it helps to > stick to the a value similar to the type of value the variable could > typically hold. > ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Script-Fu for batch image conversion
Sorry for being unclear - when I said "this line" I was referring to: (set! num-layers (car (gimp-image-get-layers newimage))) On Sat, Jul 24, 2010 at 9:50 AM, Dillon wrote: > I think that this line is not returning the number of layers as we're > expecting. I tried using gimp-message to write the number of layers out to > the console, but it generates another batch execution error. > > Here is the code: > > (define (batch-save-as-xcf pattern) > (let* ( > (filelist (cadr (file-glob pattern 1))) > (fileparts) > (xcfname) > (filename) > (image) > (newimage) > (drawable) > (num-layers) > (layerIDs) > (pos) > (layerToKeep) > (i) > ) > (gimp-message-set-handler 2) > (gimp-message "Preparing to act on the following files") > (gimp-message pattern) > > (while (pair? filelist) > ; set filename to the name of the current file in the glob > (set! filename (car filelist)) > (gimp-message "The current file is: ") > (gimp-message filename) > > ; set xcfname by tokenizing on "." and taking everything but the last part > (set! fileparts (strbreakup filename ".")) > (set! fileparts (butlast fileparts)) > (set! xcfname (string-append (unbreakupstr fileparts ".") ".xcf")) > (gimp-message "The new filename will be: ") > (gimp-message xcfname) > ; set image from the file, and then get the first layer and set it to > newimage > (gimp-message "Loading File.") > (set! newimage (car (gimp-file-load RUN-NONINTERACTIVE filename > filename))) > (set! num-layers (car (gimp-image-get-layers newimage))) > (set! layerIDs (cadr (gimp-image-get-layers newimage))) > (gimp-message "The current file has the following number of layers: ") > (gimp-message num-layers) > > ;(set! layerToKeep 0) > ;(set! pos 0) > ;(while (< pos num-layers) > ;(unless (= pos layerToKeep) > ;(gimp-image-remove-layer newimage (vector-ref layerIDs pos)) > ;) > ; (set! i (+ i 1)) > ; ) > > ; set drawable to the newimage > (gimp-message "Setting the Drawable.") > (set! drawable (car (gimp-image-flatten newimage))) > > ; save the drawable from newimage as xcfname > (gimp-message "Saving the new file.") > (gimp-file-save RUN-NONINTERACTIVE newimage drawable xcfname xcfname) > > ;(gimp-image-delete image) > ;(gimp-image-delete newimage) > (set! filelist (cdr filelist)) > ) > ) > ) > > > Here is the output: > > script-fu.exe-Warning: Preparing to act on the following files > > script-fu.exe-Warning: c:\test\ArroyoSanJose-014.tif > > script-fu.exe-Warning: The current file is: > > script-fu.exe-Warning: c:\test\ArroyoSanJose-014.tif > > script-fu.exe-Warning: The new filename will be: > > script-fu.exe-Warning: c:\test\ArroyoSanJose-014.xcf > > script-fu.exe-Warning: Loading File. > > TIFF image-Warning: Warning: > The image you are loading has 16 bits per channel. GIMP can only handle 8 > bit, s > o it will be converted for you. Information will be lost because of this > convers > ion. > > script-fu.exe-Warning: The current file has the following number of layers: > > batch command experienced an execution error > > (Type any character to close this window) > > > On Sat, Jul 24, 2010 at 9:39 AM, Dillon wrote: > >> It just says: >> >> batch command experienced an execution error >> >> (Type any character to close this window) >> >> >> Is there a way to get the batch engine to provide more verbose output? >> >> You're probably right about the variable declarations. Doh! >> >> On Sat, Jul 24, 2010 at 4:11 AM, Cameron Gregory wrote: >> >>> what is the error? >>> >>> But you need to declare num-layers and layerID's at the top (like >>> newimage and drawable) >>> >>> Cameron >>> >>> On 24/07/2010, at 3:35 PM, Dillon wrote: >>> >>> As soon as I add in either of these lines: >>> >>> (set! num-layers (car (gimp-image-get-layers newimage))) >>> (set! layerIDs (cadr (gimp-image-get-layers newimage))) >>> >>> >>> I get batch command execution errors. >>> >>> The full script is: >>> >>> (define (batch-save-as-xcf pattern) >>> (let* ( >>> (filelist (cadr (file-glob pattern 1))) >>> (fileparts) >>> (xcfname) >>> (filename) >>> (image) >>> (newimage) >>> (drawable) >>> ) >>> (gimp-message-set-handler 2) >>> (gimp-message "Preparing to act on the following files") >>> (gimp-message pattern) >>> >>> (while (pair? filelist) >>> ; set filename to the name of the current file in the glob >>> (set! filename (car filelist)) >>> (gimp-message "The current file is: ") >>> (gimp-message filename) >>> >>> ; set xcfname by tokenizing on "." and taking everything but the last >>> part >>> (set! fileparts (strbreakup filename ".")) >>> (set! fileparts (butlast fileparts)) >>> (set! xcfname (string-append (unbreakupstr fileparts ".") ".xcf")) >>> (gimp-message "The new filename will be: ") >>> (gimp-message xcfname) >>> ; set image from the file, and then get the first layer and set it to >>> newimage >>> (gimp-message "Loading File.") >>> (se
Re: [Gimp-user] Script-Fu for batch image conversion
I think that this line is not returning the number of layers as we're expecting. I tried using gimp-message to write the number of layers out to the console, but it generates another batch execution error. Here is the code: (define (batch-save-as-xcf pattern) (let* ( (filelist (cadr (file-glob pattern 1))) (fileparts) (xcfname) (filename) (image) (newimage) (drawable) (num-layers) (layerIDs) (pos) (layerToKeep) (i) ) (gimp-message-set-handler 2) (gimp-message "Preparing to act on the following files") (gimp-message pattern) (while (pair? filelist) ; set filename to the name of the current file in the glob (set! filename (car filelist)) (gimp-message "The current file is: ") (gimp-message filename) ; set xcfname by tokenizing on "." and taking everything but the last part (set! fileparts (strbreakup filename ".")) (set! fileparts (butlast fileparts)) (set! xcfname (string-append (unbreakupstr fileparts ".") ".xcf")) (gimp-message "The new filename will be: ") (gimp-message xcfname) ; set image from the file, and then get the first layer and set it to newimage (gimp-message "Loading File.") (set! newimage (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) (set! num-layers (car (gimp-image-get-layers newimage))) (set! layerIDs (cadr (gimp-image-get-layers newimage))) (gimp-message "The current file has the following number of layers: ") (gimp-message num-layers) ;(set! layerToKeep 0) ;(set! pos 0) ;(while (< pos num-layers) ;(unless (= pos layerToKeep) ;(gimp-image-remove-layer newimage (vector-ref layerIDs pos)) ;) ; (set! i (+ i 1)) ; ) ; set drawable to the newimage (gimp-message "Setting the Drawable.") (set! drawable (car (gimp-image-flatten newimage))) ; save the drawable from newimage as xcfname (gimp-message "Saving the new file.") (gimp-file-save RUN-NONINTERACTIVE newimage drawable xcfname xcfname) ;(gimp-image-delete image) ;(gimp-image-delete newimage) (set! filelist (cdr filelist)) ) ) ) Here is the output: script-fu.exe-Warning: Preparing to act on the following files script-fu.exe-Warning: c:\test\ArroyoSanJose-014.tif script-fu.exe-Warning: The current file is: script-fu.exe-Warning: c:\test\ArroyoSanJose-014.tif script-fu.exe-Warning: The new filename will be: script-fu.exe-Warning: c:\test\ArroyoSanJose-014.xcf script-fu.exe-Warning: Loading File. TIFF image-Warning: Warning: The image you are loading has 16 bits per channel. GIMP can only handle 8 bit, s o it will be converted for you. Information will be lost because of this convers ion. script-fu.exe-Warning: The current file has the following number of layers: batch command experienced an execution error (Type any character to close this window) On Sat, Jul 24, 2010 at 9:39 AM, Dillon wrote: > It just says: > > batch command experienced an execution error > > (Type any character to close this window) > > > Is there a way to get the batch engine to provide more verbose output? > > You're probably right about the variable declarations. Doh! > > On Sat, Jul 24, 2010 at 4:11 AM, Cameron Gregory wrote: > >> what is the error? >> >> But you need to declare num-layers and layerID's at the top (like newimage >> and drawable) >> >> Cameron >> >> On 24/07/2010, at 3:35 PM, Dillon wrote: >> >> As soon as I add in either of these lines: >> >> (set! num-layers (car (gimp-image-get-layers newimage))) >> (set! layerIDs (cadr (gimp-image-get-layers newimage))) >> >> >> I get batch command execution errors. >> >> The full script is: >> >> (define (batch-save-as-xcf pattern) >> (let* ( >> (filelist (cadr (file-glob pattern 1))) >> (fileparts) >> (xcfname) >> (filename) >> (image) >> (newimage) >> (drawable) >> ) >> (gimp-message-set-handler 2) >> (gimp-message "Preparing to act on the following files") >> (gimp-message pattern) >> >> (while (pair? filelist) >> ; set filename to the name of the current file in the glob >> (set! filename (car filelist)) >> (gimp-message "The current file is: ") >> (gimp-message filename) >> >> ; set xcfname by tokenizing on "." and taking everything but the last >> part >> (set! fileparts (strbreakup filename ".")) >> (set! fileparts (butlast fileparts)) >> (set! xcfname (string-append (unbreakupstr fileparts ".") ".xcf")) >> (gimp-message "The new filename will be: ") >> (gimp-message xcfname) >> ; set image from the file, and then get the first layer and set it to >> newimage >> (gimp-message "Loading File.") >> (set! newimage (car (gimp-file-load RUN-NONINTERACTIVE filename >> filename))) >> (set! num-layers (car (gimp-image-get-layers newimage))) >> (set! layerIDs (cadr (gimp-image-get-layers newimage))) >> >> ; set drawable to the newimage >> (gimp-message "Setting the Drawable.") >> >> (set! drawable (car (gimp-image-flatten newimage))) >> >> >> ; save the drawable from newimage as xcfname >> (gimp-message "Saving the new file.") >> (gimp-fi
Re: [Gimp-user] Script-Fu for batch image conversion
It just says: batch command experienced an execution error (Type any character to close this window) Is there a way to get the batch engine to provide more verbose output? You're probably right about the variable declarations. Doh! On Sat, Jul 24, 2010 at 4:11 AM, Cameron Gregory wrote: > what is the error? > > But you need to declare num-layers and layerID's at the top (like newimage > and drawable) > > Cameron > > On 24/07/2010, at 3:35 PM, Dillon wrote: > > As soon as I add in either of these lines: > > (set! num-layers (car (gimp-image-get-layers newimage))) > (set! layerIDs (cadr (gimp-image-get-layers newimage))) > > > I get batch command execution errors. > > The full script is: > > (define (batch-save-as-xcf pattern) > (let* ( > (filelist (cadr (file-glob pattern 1))) > (fileparts) > (xcfname) > (filename) > (image) > (newimage) > (drawable) > ) > (gimp-message-set-handler 2) > (gimp-message "Preparing to act on the following files") > (gimp-message pattern) > > (while (pair? filelist) > ; set filename to the name of the current file in the glob > (set! filename (car filelist)) > (gimp-message "The current file is: ") > (gimp-message filename) > > ; set xcfname by tokenizing on "." and taking everything but the last > part > (set! fileparts (strbreakup filename ".")) > (set! fileparts (butlast fileparts)) > (set! xcfname (string-append (unbreakupstr fileparts ".") ".xcf")) > (gimp-message "The new filename will be: ") > (gimp-message xcfname) > ; set image from the file, and then get the first layer and set it to > newimage > (gimp-message "Loading File.") > (set! newimage (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) > (set! num-layers (car (gimp-image-get-layers newimage))) > (set! layerIDs (cadr (gimp-image-get-layers newimage))) > > ; set drawable to the newimage > (gimp-message "Setting the Drawable.") > > (set! drawable (car (gimp-image-flatten newimage))) > > > ; save the drawable from newimage as xcfname > (gimp-message "Saving the new file.") > (gimp-file-save RUN-NONINTERACTIVE newimage drawable xcfname xcfname) > > (set! filelist (cdr filelist)) > ) > ) > ) > > > > > Date: Sun, 06 Jun 2010 17:46:15 -0400 > From: saulgo...@flashingtwelve.brickfilms.com > Subject: Re: [Gimp-user] Script-Fu for batch image conversion > To: gimp-user@lists.XCF.Berkeley.EDU > Message-ID: ><20100606174615.awibbw09xk44k...@flashingtwelve.brickfilms.com> > Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; >format="flowed" > > Quoting Dillon : > > > The reason I'm writing my own script-fu, rather than using Daves Batch > > Processor, is that my TIF files are multi-page, and when I load the image > > and flatten it to a drawable, I end up with both pages flattened into one > > drawable. I only want one of the pages (I think the first). > > > > I need to find a way to select that page (which I assume is turned into a > > layer when the TIF is loaded), and just set that layer to be my drawable. > > In that case, you were on the right track originally with using > 'gimp-image-get-layers' (I am also assuming multi-page TIFFs load as > separate layers). However, you had incorrectly handled the value > returned by the function. > > 'gimp-image-get-layers' returns returns a list containing two > elements: the number of layers in the image and an array of the > layerIDs of those layers: > > (set! num-layers (car (gimp-image-get-layers image))) > (set! layerIDs (cadr (gimp-image-get-layers image))) > > You can obtain the layerID of the top layer with: > > (set! top-layer (vector-ref layerIDs 0)) > > The next down with: > > (set! next-layer (vector-ref layerIDs 1)) > > And so on: > > (set! bottom-layer (vector-ref layerIDs (- num-layers 1))) > > > If you know the position of the layer you wish to keep (the TIFF > page), you can then remove all of the other layers from the image with: > > (set! pos 0) > (while (< pos num-layers) > (unless (= pos TIFFpage) > (gimp-image-remove-layer image (vector-ref layerIDs pos)) > ) > (set! i (+ i 1)) > ) > > ___ > 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] Script-Fu for batch image conversion
Dillon wrote: > (set! num-layers (car (gimp-image-get-layers newimage))) > (set! layerIDs (cadr (gimp-image-get-layers newimage))) What error messages do you get when the above lines are included? > (define (batch-save-as-xcf pattern) > (let* ( > (filelist (cadr (file-glob pattern 1))) > (fileparts) > (xcfname) > (filename) > (image) > (newimage) > (drawable) > ) The declarations for variables "fileparts" through to "drawable" are wrong. You must provide an initial value when defining a variable in a let block. The simple solution is to add a 0 or -1 to the declarations for numeric variables and "" string variables. Any value will work but it helps to stick to the a value similar to the type of value the variable could typically hold. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Orginizing plug-ins
I have lots of plug-ins that need to be organized, Is there an easy way to fix this? I dont know how to write code, I have version 2.6.8 for a ubuntu 10.04 lts laptop. Thanks, Michael Photographer for hire mp0097...@email.lmc.edu > From: gimp-user-requ...@lists.xcf.berkeley.edu > Subject: Gimp-user Digest, Vol 94, Issue 24 > To: gimp-user@lists.XCF.Berkeley.EDU > Date: Fri, 23 Jul 2010 22:35:29 -0700 > > Send Gimp-user mailing list submissions to > gimp-user@lists.XCF.Berkeley.EDU > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user > or, via email, send a message with subject or body 'help' to > gimp-user-requ...@lists.xcf.berkeley.edu > > You can reach the person managing the list at > gimp-user-ow...@lists.xcf.berkeley.edu > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Gimp-user digest..." > > > Today's Topics: > >1. Re: Making Source Code Available (Jernej Simon?i?) >2. Re: Making Source Code Available (Gene Heskett) >3. Re: Script-Fu for batch image conversion (Dillon) > > > -- > > Message: 1 > Date: Fri, 23 Jul 2010 21:13:44 +0200 > From: Jernej Simon?i? > Subject: Re: [Gimp-user] Making Source Code Available > To: gimp-user@lists.xcf.berkeley.edu > Message-ID: <1o225j65tiud9$.wxu4f8l3o3nk@40tude.net> > Content-Type: text/plain; charset="utf-8" > > On Fri, 23 Jul 2010 11:27:00 -0700, David Herman wrote: > > > You would need to include the > > source archive for each version of GIMP included on the CD (Windows, BSD, > > Mac, Linux, > > QNX, etc) > > Since GIMP for these systems compiles from the same source, it's enough to > include a single copy of it on the CD. > > -- > < Jernej Simon?i? ><><><><>< http://eternallybored.org/ > > > > > -- > > Message: 2 > Date: Fri, 23 Jul 2010 15:56:36 -0400 > From: Gene Heskett > Subject: Re: [Gimp-user] Making Source Code Available > To: gimp-user@lists.xcf.berkeley.edu > Message-ID: <201007231556.36835.gene.hesk...@gmail.com> > Content-Type: Text/Plain; charset="utf-8" > > On Friday, July 23, 2010 03:49:57 pm wal...@12on14.com did opine: > > > Please accept my apologies. I am new to this forum. > > > > walton > > > > NP Walton, I really wasn't trying to be a list enforcer, just reminding. > > 1. Welcome to the list, enjoy. There are some pretty smart folks here. > It doesn't seem to be a high traffic list. > > 2. Now, please ask your question again so that those who can answer it > authoritatively, might do so. > > 3. Please try to keep your replies to the list so that others might be > able to search the list archives and possibly find the answer. > > -- > Cheers, Gene > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > It pays in England to be a revolutionary and a bible-smacker most of > one's life and then come round. > -- Lord Alfred Douglas > > > > -- > > Message: 3 > Date: Fri, 23 Jul 2010 22:35:07 -0700 > From: Dillon > Subject: Re: [Gimp-user] Script-Fu for batch image conversion > To: gimp-user@lists.xcf.berkeley.edu > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > As soon as I add in either of these lines: > > (set! num-layers (car (gimp-image-get-layers newimage))) > (set! layerIDs (cadr (gimp-image-get-layers newimage))) > > > I get batch command execution errors. > > The full script is: > > (define (batch-save-as-xcf pattern) > (let* ( > (filelist (cadr (file-glob pattern 1))) > (fileparts) > (xcfname) > (filename) > (image) > (newimage) > (drawable) > ) > (gimp-message-set-handler 2) > (gimp-message "Preparing to act on the following files") > (gimp-message pattern) > > (while (pair? filelist) > ; set filename to the name of the current file in the glob > (set! filename (car filelist)) > (gimp-message "The current file is: ") > (gimp-message filename) > > ; set xcfname by tokenizing on "." and taking everything but the last part > (set! fileparts (strbreakup filename ".")) > (set! fileparts (butlast fileparts)) > (set! xcfname (string-append (unbreakupstr fileparts ".") ".xcf")) > (gimp-message "The new filename will be: ") > (gimp-message xcfname) > ; set image from the file, and then get the first layer and set it to > newimage > (gimp-message "Loading File.") > (set! newimage (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) > (set! num-layers (car (gimp-image-get-layers newimage))) > (set! layerIDs (cadr (gimp-image-get-layers newimage))) > > ; set drawable to the newimage > (gimp-message "Setting the Drawable.") > > (set! drawable (car (gimp-image-flatten newimage))) > > > ; save the drawable from new