Re: [Gimp-user] How to crop with defined aspect ratio ???

2010-02-03 Thread Dave 77459
On Wed, Feb 3, 2010 at 4:02 PM, Dave 77459 dave77...@gmail.com wrote:

 On Wed, Feb 3, 2010 at 3:52 PM, helices heli...@helices.org wrote:

 When I'm editing an image and I want to crop that image so it will print
 8x10 or 5x8 or whatever, I'm challenged by adjusting the selection box
 to exactly the right proportions.

 What am I missing?

 Best Regards,

 Mike


 Mike,

 When you select the Crop tool, there is a settings dialog?  (I do it from
 the toolbox).

 On the settings dialog, there is a Fixed checkbox.  Check that, then
 select Aspect Ratio from the drop down to the right of it.

 In the box below, enter in 8:10 or 10:8 or 5:8 or 8:5.  If you get the
 wrong one (is it height:width or width:height, I can never remember), you
 can use the paper sheets next to the box to make the selection.

 Hope this helps.

 Dave


I note that I replied to sender, instead of the list.  Culpa mea.

Dave
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Anchoring a layer in script-fu

2009-10-21 Thread Dave 77459
I am automating a LAB Enhancement process.  It is found here:

http://www.dslreports.com/forum/remark,15173919

In short, you decompose to LAB.  You monkey with the A and B channels, then
use curves on L.  Finally, you recompose.

One issue is that you have to copy the resulting A1 and B1 channels, and
then anchor them back into the original A and B channels so that you can
recompose.  Merging down into A or B apparently creates new layers and you
lose the ability to recompose.

The attached script for version 2.6.2 gets to the last step that I am going
to (I'm stopping before applying curves to the L channel because I'll do
that manually depending on the image).  I create the altered A1 and B1
channels.  I paste B1 and anchor it into B.

However, when I paste A1, it is anchoring into B, instead of A.  A is the
top layer, but I can't get the script to anchor into it.  When I anchor
manually, it also anchors into B.  I'm frustrated and mystified in equal
measure.

Another side effect is that running this script wipes out the filters, and I
have to refresh them.  :-(

Can any Script-fu wizards out there tell me what I am doing wrong?

Dave

 script follows and is attached 

; LAB Enhance
; David Hathaway dave77...@gmail.com
;
; Based on:
;
;http://www.dslreports.com/forum/remark,15173919
;
; v 0.5 - 21 OCT 2009 (first working version)


(define (LAB-Enhance img
 drawable)
  (gimp-image-undo-group-start img)

  ; set some system variables
  (let*
   (
  (width (car (gimp-image-width img)))
  (height (car (gimp-image-height img)))
  (blend-layer)
  (b-copy1-layer)
  (b-copy2-layer)
  (a-copy1-layer)
  (a-copy2-layer)
   (layers (gimp-image-get-layers img))
   (B1)
   (B2)
   (B3)
   (editcopy)
   (A1)
   (A2)
   (A3)
   )

  ; copy A channel and add as second layer
  (set! A1 (car (gimp-layer-new-from-drawable (
  aref (cadr layers) 1)
  img)))
  (gimp-drawable-set-name A1 A 1)
  (gimp-image-add-layer img A1 1)

(gimp-image-undo-group-end img)
(gimp-image-undo-group-start img)

  ; copy B channel and set as 4th layer
  (set! B1 (car (gimp-layer-new-from-drawable (
  aref (cadr layers) 2)
  img)))

  (gimp-drawable-set-name B1 B 1)
  (gimp-image-add-layer img B1 3)

(gimp-image-undo-group-end img)
(gimp-image-undo-group-start img)

  ; copy the B channel copy and make overlay, inserting as 4th layer
  (set! B2 (car (gimp-layer-new-from-drawable (
  aref (cadr layers) 2)
  img)))

  (gimp-drawable-set-name B2 B 2)
  (gimp-layer-set-mode B2 OVERLAY-MODE)
  (gimp-image-add-layer img B2 3)


(gimp-image-undo-group-end img)
(gimp-image-undo-group-start img)

  ; merge new B channels
  (set! B3 (gimp-image-merge-down img B2 EXPAND-AS-NECESSARY))

(gimp-image-undo-group-end img)
(gimp-image-undo-group-start img)

  ; copy the A channel copy and make overlay, inserting as 2nd layer
  (set! A2 (car (gimp-layer-new-from-drawable (
  aref (cadr layers) 1)
  img)))

  (gimp-drawable-set-name A2 A 2)
  (gimp-layer-set-mode A2 OVERLAY-MODE)
  (gimp-image-add-layer img A2 1)


(gimp-image-undo-group-end img)
(gimp-image-undo-group-start img)

  ; merge new B channels
  (set! A3 (gimp-image-merge-down img A2 EXPAND-AS-NECESSARY))

(gimp-image-undo-group-end img)
(gimp-image-undo-group-start img)

  ; move B to top
  (gimp-image-raise-layer-to-top img (aref (cadr layers) 2))

(gimp-image-undo-group-end img)
(gimp-image-undo-group-start img)

  ; cut B1, paste into layer, and anchor
  (gimp-image-set-active-layer img (aref (cadr (gimp-image-get-layers img))
4))
  (gimp-selection-all img)
  (gimp-edit-cut (aref (cadr (gimp-image-get-layers img)) 4))
  (gimp-image-set-active-layer img (aref (cadr (gimp-image-get-layers img))
0))
  (gimp-floating-sel-anchor (car (gimp-edit-paste drawable TRUE)))

(gimp-image-undo-group-end img)
(gimp-image-undo-group-start img)

  ; move A to top
  (gimp-image-raise-layer-to-top img (aref (cadr layers) 1))
  (gimp-image-set-active-layer img (aref (cadr layers) 1))

(gimp-image-undo-group-end img)
(gimp-image-undo-group-start img)

  ; cut A1, paste into layer, and anchor
  (gimp-image-set-active-layer img (aref (cadr (gimp-image-get-layers img))
3))
  (gimp-selection-all img)
  (gimp-edit-cut (aref (cadr (gimp-image-get-layers img)) 3))
  (gimp-image-set-active-layer img (aref (cadr (gimp-image-get-layers img))
0))
 (gimp-edit-paste drawable TRUE)
;  (gimp-floating-sel-anchor (car (gimp-edit-paste drawable TRUE)))

  ; move L back to top
;  (gimp-image-raise-layer-to-top img (aref (cadr layers) 0))
;  (gimp-image-set-active-layer img (aref (cadr (gimp-image-get-layers img))
0))


  ) ; let*

  ; Flush the display
  (gimp-image-undo-group-end img)
  (gimp-displays-flush)
)

(script-fu-register LAB-Enhance
   

Re: [Gimp-user] Can't recompose LAB: Specified layer # not found

2009-09-28 Thread Dave 77459
I found this old Q/A after trying the tutorial referenced:

http://www.dslreports.com/forum/remark,15173919

Here is the full list of steps:

1)Open Image
2)Go to ImageModeDecompose
3)Check LAB, Check Decompose to Layers, hit OK
4)Open Layers dialog. Make only the B layer visible.
5)Duplicate B layer, set B Copy to overlay (Opacity is 100%).
6)Merge both B layers (ImageMerge Visible Layers/CTRL-M) Choose Expand as
necessary (though other options don't make a difference in this case) Hit
Ok.
7)Repeat steps #4 through #6 for the A layer.
8)Select L layer, apply a slight S curve, mostly adjusted towards the dark
end of the curve. (GIMP's overlay is calculated a bit differently)
9)ImageModeRecompose and Make sure you select LAB with the correct layer
order.

Following the help provided below (Copy, Anchor), I could do it.  But I have
a question regarding Step 9 above.  Is the order of the layers important?
It seems that the layers are tagged, so as long as the original layers are
present, the order shouldn't matter.  Right?

Not to confuse issues, but my original reason for looking at the above page
was for this PS tutorial:

http://freeonlineclasses.net/photoshop-tutorials/photo-effects/the-golden-glow.html

On page two of this tutorial, when they pick the B channel (from LAB), they
get an orangy cast.  I faked this by picking the B layer from the LAB
decomposition, then color changing to shift red and yellow to the limits.  I
don't know what LAB is doing, but the result is pleasing and seems to mimic
the tutorial.  But is there a direct corollary to the golden glow tutorial?

Dave



On Wed, Feb 4, 2009 at 10:08 PM, saulgo...@flashingtwelve.brickfilms.comwrote:

 Quoting Colin Brace c...@lim.nl:
   :
:
  5)Duplicate B layer, set B Copy to overlay (Opacity is 100%).
  6)Merge both B layers (ImageMerge Visible Layers/CTRL-M) Choose Expand
 as
  necessary (though other options don't make a difference in this case) Hit
  Ok.
  7)Repeat steps #4 through #6 for the A layer.
 
  However, after following these steps, when I click the Recompose
 command,
  I get an error message on the status line:
 
  Specified layer [some number] not found.

 The problem is that 'Recompose' relies upon the layer IDs of the three
 layers and your merging of two layers results in the new layer being
 given a different layer ID.

 As a work-around, you need to duplicate your B layer twice and work
 with the two copies, leaving the original layer untouched. After you
 have completed your editing and merged your copies together, perform
 an Edit-Cut, Paste it onto the original layer, and Anchor the
 floating layer.

 Unlike Merging, pasting and anchoring will not change the layer ID of
 the original layer and Recompose will function as expected.


 ___
 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


[Gimp-user] Bubble effect

2009-01-30 Thread Dave 77459
A friend of mine created the attached photo.  She used the Bubbles filter
on some very old MS software that came installed with Windows 2000.  Is
there a gimp filter that can mimic this effect?

In case the attachment fails, her photo is here:

http://flickr.com/photos/22414...@n07/3214860244

Dave
attachment: 3214860244_e94c48570e_m.jpg___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Bubble effect

2009-01-30 Thread Dave 77459
Thanks for the pointer.  Do you have a recommendation for settings?
GIMPressionist seems to overlap brushes, rather than varying the size to fit
available spaces without overlap.

Dave

On Fri, Jan 30, 2009 at 10:54 AM, Michael J. Hammel 
mjham...@graphics-muse.org wrote:

 On Fri, 2009-01-30 at 08:52 -0600, Dave 77459 wrote:
   A friend of mine created the attached photo.  She used the Bubbles
  filter on some very old MS software that came installed with Windows
  2000.  Is there a gimp filter that can mimic this effect?
 
  In case the attachment fails, her photo is here:
 
  http://flickr.com/photos/22414...@n07/3214860244

 Try GIMPressionist.  It does similar things and should be available in
 the stock GIMP 2.6 distribution.

 --
 Michael J. HammelPrincipal Software
 Engineer
 mjham...@graphics-muse.org
 http://graphics-muse.org

 --
 Open your arms to change, but don't let go of your values.
  --  Credited to the Dalai Lama.


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] How to update GIMP in Ubuntu?

2008-12-15 Thread Dave 77459
Thank you everyone for your ideas.  I ended up upgrading to Ubuntu 8.1,
which automagically upgraded me to Gimp 2.6.1.  I'll now investigate how to
make the incremental upgrade to 2.6.3 or whatever.

As an aside, I had been running 8.04 LTS.  I didn't realize that the LTS
variants would not offer an upgrade to non-LTS versions.  That's why one
computer was running 8.10 but this one was running 8.04.

I do enjoy the 2.6.x flavors of GIMP, despite the shift in interface
paradigms.  I know it is a small thing, but my favorite improvement is the
diagonal line that shows in the curves dialog.  It really does help to let
me know how radical my changes are.  It's such a small thing, but I
appreciate it every day.

Thanks again for your insight and help.

Dave


On Mon, Dec 15, 2008 at 2:17 AM, Claus Cyrny claus.cy...@web.de wrote:

 Hi Dave,

 Owen wrote:

 I am running Ubuntu Linux v8.04.  I love Gimp 2.6 on Windows, but am
 using
 only version 2.4.5 on Ubuntu.

 How do I upgrade to v 2.6.x of Gimp on Ubuntu?




 I don't think you are going to be able to do this.

 To do so requires a number of updated libraries, glib,gtk, babl and
 gegl are 4 off the top of my head and I am pretty sure the 8.04
 repositories wont hold these.

 You can do it by building your own libraries from the sources, but I
 guess you don't want to do that


 As an afterthought to my private email, I think I agree with that.
 There are simply too many additional libraries to update, not just
 'gimp-data' and 'libgimp'. I only kept my /home partition from Ubuntu
 8.04 and did a complete new install of Ubuntu 8.10.


 HTH,

 Claus

 --
 Claus Cyrny : Webdesign |  Grafik | Fotografie
 :: Web: http://home.arcor.de/ccyrny/ ::.

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] How to update GIMP in Ubuntu?

2008-12-14 Thread Dave 77459
I am running Ubuntu Linux v8.04.  I love Gimp 2.6 on Windows, but am using
only version 2.4.5 on Ubuntu.

How do I upgrade to v 2.6.x of Gimp on Ubuntu?

Dave
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] History Brush

2008-06-04 Thread Dave 77459
Thanks for the suggestions.  I didn't understand what she was trying to
accomplish with the History Brush, since I don't have it.  Knowing that and
getting the suggestions has really helped.

Thanks!

On Tue, Jun 3, 2008 at 1:54 PM, Dave 77459 [EMAIL PROTECTED] wrote:

 I came across a neat doll recipe, written in PS:

 http://www.flickr.com/photos/evaxebra/532572791/

 The use of the history brush has been called crucial by the writer.

 Knowing that GIMP does not have the history brush, what does it do and how
 do I accomplish the function in GIMP?

 Dave


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] History Brush

2008-06-03 Thread Dave 77459
I came across a neat doll recipe, written in PS:

http://www.flickr.com/photos/evaxebra/532572791/

The use of the history brush has been called crucial by the writer.

Knowing that GIMP does not have the history brush, what does it do and how
do I accomplish the function in GIMP?

Dave
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Using GREYCstoration in a .scm file

2008-05-20 Thread Dave 77459
Can someone tell me the calling procedure for invoking the GREYCstoration
plug-in using GIMP 2.4.5?

I tried (using defaults from the plug-in's dialog box):

   (plug-in-greycstoration RUN-NONINTERACTIVE img drawable
60.0 0.70 0.30 0.6 1.10 0.80 30.0 0 1 1)

and got Error: syntax error: illegal token 1 when refreshing scripts to
load my test.

All I want to do is resize the image, invoke an unsharp mask, then call
GREYCstoration using the defaults.

Help is appreciated,

Dave
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Turn black background into white -- with fuzzy edges

2007-11-26 Thread Dave 77459
On Nov 26, 2007 3:57 AM, Owen [EMAIL PROTECTED] wrote:

 On Mon, 26 Nov 2007 03:59:23 -0500
 Lea Wiemann [EMAIL PROTECTED] wrote:

  Any ideas on this one?


 If you are using 2.4, Colours-Colour to alpha
 or in 2.2 Filters-Colours-Colour to alpha

 After that, make a new layer and fill with whatever colour you want



 Owen



I don't know if that satisfies her need, but it is a useful technique I did
not know about but will use extensively.  Thank you.

Dave
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Urban Acid script (buggy)

2007-11-08 Thread Dave 77459
Kevin,

Thank you giving me this information.  It is really useful to know.  I think
it ought to be part of the Migration guide, because naive script writers
like me don't know that functions like set-pt are locally defined.  I
thought I was using a built-in function.

It is further confused by the fact that the Windows version *does not*
complain that set-pt is not defined.  It is apparently defined elsewhere and
is being found.

To my mind, set-pt is either a global function or must declared locally and
if GIMP is finding a local function, then this is a bug.  It is being
handled two different ways; perhaps it is a 2.4.0 versus 2.4.1 difference?

Thanks for your help.  I think I'll try a different way of setting the
splines since this is static.

Dave

On Nov 7, 2007 7:29 PM, Kevin Cozens [EMAIL PROTECTED] wrote:

 Dave 77459 wrote:
  Owen,
 
  Thanks for confirming that it works in 2.2 under Ubuntu and crashes on
 2.4.
 
  I too got that unbound error on 2.4 .  I declared all the variables,
  which cleared that up under Windows.  I still got the unbound error in
  Ubuntu, which is odd since set-pt is a function, not a variable??
 
  So I added this in the hopes it would clear up:
 
 ; define the set-pt procedure (used to be embedded??)
 ; from http://adrian.gimp.org/scripts/shagadelic.scm
 (define (set-pt a index x y)
 [snip]

 The script calls set-pt but did not define the function. In GIMP 2.2functions
 in one file were defined in a way that made them available to be called by
 scripts in other files. While this can be a useful feature at times it can
 also cause problems.

 There were two scripts that defined point-list-double-array which took
 one
 argument. The routines were different and as a result, one of the two
 scripts
 appeared to be broken as it wound up calling the wrong version of the
 function.

 As of GIMP 2.4, the scripts which ship as part of the Script-Fu plug-in
 define
 the functions they need locally (ie. other scripts can't access them).
 This
 avoids the problems of adding a new script and finding out that some other
 previously working script no longer works.

 --
 Cheers!

 Kevin.

 http://www.ve3syb.ca/   |What are we going to do today, Borg?
 Owner of Elecraft K2 #2172  |Same thing we always do, Pinkutus:
 |  Try to assimilate the world!
 #include disclaimer/favourite |  -Pinkutus  the Borg
 ___
 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


[Gimp-user] Urban Acid script v 0.6.5

2007-11-08 Thread Dave 77459
Well, this version seems to work cleanly under GIMP 2.4.1 (Windows).  I got
a new definition of set-pt from a different source, but it looks exactly the
same. I moved the (define outside the main (let* and removed the declaration
of (a).  I'll test to see if it runs under Ubuntu (2.4.0) when I get home.

Dave

--
; Urban Acid
; David Hathaway [EMAIL PROTECTED]
;
; A script to fake the Urban Acid look within The Gimp version 2.
;
; This script is based on:
;
http://www.scrapjazz.com/community/jazzclub/showthread.php?t=89073page=3pp=15
;
; 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.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;
; Version 0.5 - first working version
; Version 0.6 - modified to work on GIMP 2.4
; Version 0.6.5 - modified to work on GIMP 2.4.1


(define (urban-acid img
drawable)


  ; compatibility hack
  ; http://www.lefinnois.net/scriptfu_gimp24/chrominium.scm
  (define (set-pt a index x y)
  (begin
  (aset a (* index 2) x)
  (aset a (+ (* index 2) 1) y)
   )
  )

  ; set some system variables
  (let*
   (
  (copy-layer)
  (splineValue)
  (splineRed)
  (splineGreen)
  (splineBlue)
   )

   ;7) create a duplicate layer of the base layer.
   (set! copy-layer (car (gimp-layer-copy drawable 0)))
   (gimp-layer-set-name copy-layer Copy)
   (gimp-image-add-layer img copy-layer 0)

   (define (splineValue)
  (let* ((a (cons-array 10 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 44 27)
(set-pt a 2 99 117)
(set-pt a 3 195 229)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer VALUE-LUT 10 (splineValue))

   (define (splineRed)
  (let* ((a (cons-array 10 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 51 6)
(set-pt a 2 151 137)
(set-pt a 3 204 228)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer RED-LUT 10 (splineRed))

   (define (splineGreen)
  (let* ((a (cons-array 10 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 38 31)
(set-pt a 2 125 129)
(set-pt a 3 197 223)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer GREEN-LUT 10 (splineGreen))

   (define (splineBLue)
  (let* ((a (cons-array 8 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 22 33)
(set-pt a 2 149 126)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer BLUE-LUT 8 (splineRed))

   (gimp-layer-set-mode copy-layer HARDLIGHT-MODE)
   (gimp-layer-set-opacity copy-layer 80)

  ) ; let*

  ; Flush the display
  (gimp-displays-flush)
)

(script-fu-register urban-acid
U_rban Acid
This script sets the curves based on the Urban Acid
formula
David Hathaway [EMAIL PROTECTED]
(c) David Hathaway
2007 11 08
RGB*
SF-IMAGEImage 0
SF-DRAWABLE Layer to start on (unused) 0
)
(script-fu-menu-register urban-acid
 Image/Filters/Dave77459)
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Script-Fu help?

2007-11-07 Thread Dave 77459
I have some scripts I am upgrading to work with 2.4.  What is the best place
to find help?

I've asked the question before in this list, and found help here. I don't
want to send these help requests if they are unwelcome or if there is an
official, better place.  Gimp-developer seems focused on changing the
source, rather than scripts.

TIA,

Dave
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Urban Acid script (buggy)

2007-11-07 Thread Dave 77459
Following is my Urban Acid Script-Fu program.  It attempts to simulate the
famous Photoshop Urban Acid action, which dramatically alters the color
curves.

The program worked well in GIMP 2.2, but is buggy in v2.4.  I am having the
following problems:

* The first time, it runs but the working layer shows no difference.
Indeed, even the mode is not set to overlay.

* The second time executed, not seems to happen.  Not even a copy layer is
created.

* GIMP seems to increasingly act weird after that.  Scripts may or may not
run.  The entire experience looks like a memory over run.

I am now running GIMP 2.4.1 under Windows, but I saw the same thing in
2.4under Windows and also Ubuntu (Gutsy Gibbon).

Thanks for any help.  Source follows.

Dave
--
; Urban Acid
; David Hathaway [EMAIL PROTECTED]
;
; A script to fake the Urban Acid look within The Gimp version 2.
;
; This script is based on:
;
http://www.scrapjazz.com/community/jazzclub/showthread.php?t=89073page=3pp=15
;
; 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.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;
; Version 0.5 - first working version
; Version 0.6 - modified to work on GIMP 2.4


(define (urban-acid img
drawable)

  ; set some system variables
  (let*
   (
  (copy-layer)
  (splineValue)
  (splineRed)
  (splineGreen)
  (splineBlue)
  (a)
   )

   ;7) create a duplicate layer of the base layer.
   (set! copy-layer (car (gimp-layer-copy drawable 0)))
   (gimp-layer-set-name copy-layer Copy)
   (gimp-image-add-layer img copy-layer 0)

   (define (splineValue)
  (let* ((a (cons-array 10 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 44 27)
(set-pt a 2 99 117)
(set-pt a 3 195 229)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer VALUE-LUT 10 (splineValue))

   (define (splineRed)
  (let* ((a (cons-array 10 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 51 6)
(set-pt a 2 151 137)
(set-pt a 3 204 228)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer RED-LUT 10 (splineRed))

   (define (splineGreen)
  (let* ((a (cons-array 10 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 38 31)
(set-pt a 2 125 129)
(set-pt a 3 197 223)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer GREEN-LUT 10 (splineGreen))

   (define (splineBLue)
  (let* ((a (cons-array 8 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 22 33)
(set-pt a 2 149 126)
(set-pt a 4 255 255)
a
  )
   )
   (gimp-curves-spline copy-layer BLUE-LUT 8 (splineRed))

   (gimp-layer-set-mode copy-layer HARDLIGHT-MODE)
   (gimp-layer-set-opacity copy-layer 80)

  ) ; let*

  ; Flush the display
  (gimp-displays-flush)
)

(script-fu-register urban-acid
U_rban Acid
This script sets the curves based on the Urban Acid
formula
David Hathaway [EMAIL PROTECTED]
(c) David Hathaway
2007 11 01
RGB*
SF-IMAGEImage 0
SF-DRAWABLE Layer to start on (unused) 0
)
(script-fu-menu-register urban-acid
 Image/Filters/Dave77459)
; Image/Script-Fu)
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Urban Acid script (buggy)

2007-11-07 Thread Dave 77459
Owen,

Thanks for confirming that it works in 2.2 under Ubuntu and crashes on 2.4.

I too got that unbound error on 2.4 .  I declared all the variables, which
cleared that up under Windows.  I still got the unbound error in Ubuntu,
which is odd since set-pt is a function, not a variable??

So I added this in the hopes it would clear up:

   ; define the set-pt procedure (used to be embedded??)
   ; from http://adrian.gimp.org/scripts/shagadelic.scm
   (define (set-pt a index x y)
 (prog1
(aset a (* index 2) x)
(aset a (+ (* index 2) 1) y)
 )
   )

This is added before the (define (splineValue)

It appears that set-pt is defined (built-in?) in the Windows 2.4.1 build
but not Ubuntu 2.4?

However, with that function thus defined, the Ubuntu version behaves as
quirkily as the Windows version.  Doesn't appear to do anything, but
proceeds to make GIMP act weirdly.

This odd behavior is why I am appealing for help.  I appreciate your
sleuthing.

Dave


On Nov 7, 2007 3:14 PM, [EMAIL PROTECTED] wrote:

  Following is my Urban Acid Script-Fu program.  It attempts to
 simulate
  the
  famous Photoshop Urban Acid action, which dramatically alters the color
  curves.
  The program worked well in GIMP 2.2, but is buggy in v2.4.  I am having
 the
  following problems:
  * The first time, it runs but the working layer shows no difference.
  Indeed, even the mode is not set to overlay.
  * The second time executed, not seems to happen.  Not even a copy layer
  is
  created.
  * GIMP seems to increasingly act weird after that.  Scripts may or may
  not
  run.  The entire experience looks like a memory over run.
  I am now running GIMP 2.4.1 under Windows, but I saw the same thing in
  2.4under Windows and also Ubuntu (Gutsy Gibbon).
 
 
  Using Ubuntu-7.4
 
  Gimp-2.2 the script works fine
 
  Running on Gimp-2.4 throws the following error
 
  Error while executing
  (urban-acid 1 2)
  Error: eval: unbound variable: set-pt
 
 
  But I am not up with Script-fu so will leave debugging to others


 Ah ha, read some more mail, and this one from Tobias Jakobs points to the
 Script-fu changes which include;


 By far, the most common problem that can be expected if using an older
 script is that it might assign a value to a variable without first
 declaring the variable. SIOD-based Script-fu would permit a statement such
 as (set! x 4) even if 'x' had not been declared -- 'x' would be defined
 automatically to be a global variable. The new Script-fu protects against
 this situation and the programmer must declare the variable first. The
 offending script would result in an error message stating, Error: set!:
 unbound variable: x.



 Owen


 ___
 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] Gimp 2.4: Crashing on Script-Fu Menu?

2007-11-02 Thread Dave 77459
I will be official and open a bug report.   Thanks for your help.

Dave

On 11/2/07, Sven Neumann [EMAIL PROTECTED] wrote:

 Hi,

 *snip*

It is of course unacceptable that a broken script crashes GIMP. That is
 why it is absolutely necessary that you open a bug report for this
 problem on bugzilla.gnome.org and attach the script that causes the
 problem there. I haven't been able to reproduce the problem yet, but
 given a bug-report it will eventually be fixed.


 Sven



___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Gimp 2.4: Crashing on Script-Fu Menu?

2007-11-01 Thread Dave 77459
Hi,

I'll email you the script separately since I do not know if the list takes
attachments.  But, I would guess that it is not the script because it works
well in v2.4 (candidate) in Ubuntu.

It does not appear to be the script, because it doesn't execute.  All I do
is open the menu and mouse down so as to want to run a script.  I realize
GIMP is displaying a blurb in the window footer about the script; perhaps
there is something crashing the blurb.

Thanks for the help,

Dave

On 10/31/07, Sven Neumann [EMAIL PROTECTED] wrote:

 Hi,

 On Wed, 2007-10-31 at 14:11 -0500, Dave 77459 wrote:

  When I access the Script-Fu menu and move the mouse pointer down to
  select a script, Gimp dies an inglorious death.   gimp-2.4.exe has
  encountered a problem and needs to close.  We are sorry for the
  inconvenience.
 
  To test, I deleted all the user scripts except one that works on the
  Ubuntu install.  This also causes a crash.

 It would be very useful if you could make this script available so that
 we can isolate the problem and fix it.


 Sven



___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Gimp 2.4: Crashing on Script-Fu Menu?

2007-11-01 Thread Dave 77459
I had a theory that the blurb building was killing GIMP, so I modified the
script to make the description a single line.  It now works.

The reasoning for a multi-line description was to give valuable information
in the Procedure Browser.  Now the information is the single-line blurb,
which is practically useless. :((

Why it worked in Ubuntu versus Windows is a mystery I leave to the
developers.  However, it illustrates why I never released the script to the
repository.  I cannot test scripts except on my machines and it worked up
'til Windows 2.4.  Without broad testing, running a script is a crapshoot.
The thought that my script would mysteriously hose someone's GIMP is a huge
barrier to wide release.

Dave

On 11/1/07, Dave 77459 [EMAIL PROTECTED] wrote:

 Hi,

 I'll email you the script separately since I do not know if the list takes
 attachments.  But, I would guess that it is not the script because it works
 well in v2.4 (candidate) in Ubuntu.

 It does not appear to be the script, because it doesn't execute.  All I do
 is open the menu and mouse down so as to want to run a script.  I realize
 GIMP is displaying a blurb in the window footer about the script; perhaps
 there is something crashing the blurb.

 Thanks for the help,

 Dave

 On 10/31/07, Sven Neumann [EMAIL PROTECTED] wrote:
 
  Hi,
 
  On Wed, 2007-10-31 at 14:11 -0500, Dave 77459 wrote:
 
   When I access the Script-Fu menu and move the mouse pointer down to
   select a script, Gimp dies an inglorious death.   gimp-2.4.exe has
   encountered a problem and needs to close.  We are sorry for the
   inconvenience.
  
   To test, I deleted all the user scripts except one that works on the
   Ubuntu install.  This also causes a crash.
 
  It would be very useful if you could make this script available so that
  we can isolate the problem and fix it.
 
 
  Sven
 
 
 

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Gimp 2.4: Crashing on Script-Fu Menu?

2007-10-31 Thread Dave 77459
I have used Gimp 2.4 (beta candidate) on my Ubuntu Gutsy Gibbon install and
this morning upgraded my Windows XP install from 2.2 to 2.4.

When I access the Script-Fu menu and move the mouse pointer down to select a
script, Gimp dies an inglorious death.  gimp-2.4.exe has encountered a
problem and needs to close.  We are sorry for the inconvenience.

To test, I deleted all the user scripts except one that works on the Ubuntu
install.  This also causes a crash.

I am not running a script, I am merely highlighting a menu item.

I did not uninstall v2.2, thinking that the installer would detect the
existing program and update it or delete it if necessary.  Could this be the
problem?

Any ideas?

Dave
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Best list for Script-Fu question?

2007-06-19 Thread Dave 77459

I wrote my first scheme file today, and it works great... on small images.
On large-sized originals, one or more of the created layers is corrupted.

What is the best Gimp list (or site) for getting help in figuring out what
is wrong?

Thanks in advance,

Dave
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Best list for Script-Fu question?

2007-06-19 Thread Dave 77459

That was exactly the problem.  Thank you for the rapid and spot-on help!

On 6/19/07, Simon Budig [EMAIL PROTECTED] wrote:


Dave 77459 ([EMAIL PROTECTED]) wrote:
 I wrote my first scheme file today, and it works great... on small
images.
 On large-sized originals, one or more of the created layers is
corrupted.

You need to explicitely clear newly created layers from your script.
This is done automatically in the GUI, but you have to do it yourself in
your script.

Hope this helps,
 Simon
--
  [EMAIL PROTECTED]  http://simon.budig.de/

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user