Google
  Web www.spinics.net

Re: Color temperature filter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 12/11/07 at 4:15 AM Jose Pires wrote:
>
>I used colortemp.scm from Luca de Alfaro in Gimp 2.2, but I can't make
>it work in Gimp 2.4 - when I refresh the scripts, it gives me "error
>reading string". I have already tried several variations in the last
>lines:
>(script-fu-menu-register "script-fu-colortemp"
>			 _"<Image>/Filters/Colors")
>replacing <Image>/Filters/Colors with <Image>/Colors and others.
>
>Anyone has a clue? Or knows of some script or filter that automates
>changing the color temperature.
>

Here's what I did, more by trial and error plus a little bit of scripting knowledge:

* Removed all the underscores (don't know if I needed to, but it was the first thing I did and couldn't be bothered putting them back in later).
* Removed the script-fu-menu-register function completely.
* Inserted the "<image>/Filters/Colors" line to the second line of the register function, which is where menus are registered now.
* Removed a surplus copyright comment from the register function. 

I thought this would make everything work, but it seems there is a maximum string length.  I then removed a substantial amount of the explanation comments, and the script worked fine.  

(script-fu-register
  "script-fu-colortemp"
  "<Image>/Filters/Colors"
  "Convert Color Temperature"
  "Convert Color Temperature 1.6\n\nThis script-fu converts the color temperature of an image.  You can specify the color temperature of the original image, and the desired color temperature of the result, as well as a light intensity correction factor. There are two ways of specifying the color temperature of the original image:\n\n  1. (Option: 'From slider below') You can use a slider to specify the color temperature of the original.\n  2. (Option: 'From foreground color') The script will use as the original temperature the temperature at which a black body is of color closest to the foreground color (as selected, for instance, via the color picker tool).\n\nThe first method can be used when you know the color temperature of the source, and does not require the image to contain a white or grey object."
  "Luca de Alfaro <lda@xxxxxxxxxxxx>"
  "December 2006"
  "RGB*"
  SF-IMAGE    "Image"         0
  SF-DRAWABLE "Drawable"      0
  SF-OPTION      "Obtain original temperature" '("From slider below" "From foreground color")
  SF-ADJUSTMENT "Original temperature (K)" '(6500 1000 12000 25 250 0 0)
  SF-ADJUSTMENT "Target temperature (K)"   '(6500 1000 12000 25 250 0 0)
  SF-ADJUSTMENT "Intensity (%)" '(100 0 200 1 10 0 0)
  SF-ADJUSTMENT "Saturation change (%)" '(0 -100 100 1 10 0 0)
)

Nick



List archives: <http://groups.yahoo.com/group/gimpwin-users/>
To unsubscribe send a blank message from the address you're subscribed
to <mailto:gimpwin-users-unsubscribe@xxxxxxxxxxxxxxx> 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/gimpwin-users/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/gimpwin-users/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:gimpwin-users-digest@xxxxxxxxxxxxxxx 
    mailto:gimpwin-users-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    gimpwin-users-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Add to Google

[Gimp Developers]     [Gimp Users]     [Photos]     [Yosemite News]     [Yosemite Photos]    [Epson Inkjet]     [Scanner]     [Gimp's Home]     [GIMP Books]     [Steve's Art]     [Script Fu]     [Free Online Dating]

  Powered by Linux