[Gimp-user] Re: sf change a colors value?
Figured it out! Here is the semifinished script. ; Create a 3D sphere with optional shadow ; The sphere's principle color will be the foreground ; Parameters: ; bg-color: background color ; sphere-color: color of sphere ; radius: radius of the sphere in pixels ; light: angle of light source in degrees ; shadow: whather to create a shadow as well (define (script-fu-sphere-plus radius light light-position light-intensity shadow bg-color sphere-color keep-selection) (let* ((width (* radius 3.75)) (height (* radius 2.5)) (img (car (gimp-image-new width height RGB))) (drawable (car (gimp-layer-new img width height RGB-IMAGE Sphere Layer 100 NORMAL-MODE))) (radians (/ (* light *pi*) 180)) (cx (/ width 2)) (cy (/ height 2)) (light-x (+ cx (* radius (* light-position (cos radians) (light-y (- cy (* radius (* light-position (sin radians) (light-end-x (+ cx (* radius (cos (+ *pi* radians) (light-end-y (- cy (* radius (sin (+ *pi* radians) (offset (* radius 0.1))) (gimp-context-push) (gimp-image-undo-disable img) (gimp-image-add-layer img drawable 0) (gimp-context-set-foreground sphere-color) (gimp-context-set-background bg-color) (gimp-edit-fill drawable BACKGROUND-FILL) (set! light-i (list (* (car sphere-color) light-intensity) (* (cadr sphere-color) light-intensity) (* (caddr sphere-color) light-intensity) )) (gimp-context-set-background light-i) (if (and (or (and (= light 45) (= light 75)) (and (= light 135) (= light 105))) (= shadow TRUE)) (let ((shadow-w (* (* radius 2.5) (cos (+ *pi* radians (shadow-h (* radius 0.5)) (shadow-x cx) (shadow-y (+ cy (* radius 0.65 (if ( shadow-w 0) (prog1 (set! shadow-x (+ cx shadow-w)) (set! shadow-w (- shadow-w (gimp-ellipse-select img shadow-x shadow-y shadow-w shadow-h CHANNEL-OP-REPLACE TRUE TRUE 7.5) (gimp-edit-bucket-fill drawable BG-BUCKET-FILL MULTIPLY-MODE 100 0 FALSE 0 0))) (gimp-ellipse-select img (- cx radius) (- cy radius) (* 2 radius) (* 2 radius) CHANNEL-OP-REPLACE TRUE FALSE 0) (gimp-edit-blend drawable FG-BG-RGB-MODE NORMAL-MODE GRADIENT-RADIAL 100 offset REPEAT-NONE FALSE FALSE 0 0 TRUE light-x light-y light-end-x light-end-y) (if (= keep-selection FALSE) (gimp-selection-none img)) (gimp-image-undo-enable img) (gimp-display-new img) (gimp-context-pop))) (script-fu-register script-fu-sphere-plus __Sphere Plus... Simple sphere with a drop shadow Spencer Kimball, Nolan Clayton 1996, 2005 SF-ADJUSTMENT _Radius (pixels)'(100 5 500 1 10 0 1) SF-ADJUSTMENT _Lighting (degrees) '(45 0 360 1 10 0 0) SF-ADJUSTMENT _Lighting (position) '(0 0 1 .2 1 1 0) SF-ADJUSTMENT _Lighting (intensity) '(0 0 1 .1 1 1 0) SF-TOGGLE _Shadow TRUE SF-COLOR _Background color '(255 255 255) SF-COLOR _Sphere color '(255 0 0) SF-TOGGLE_Keep Selection TRUE ) (script-fu-menu-register script-fu-sphere-plus _Toolbox/Xtns/Script-Fu/Misc) ___ Gimp-user mailing list Gimp-user@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
[Gimp-user] Re: Default JPEG quality setting - where?
William Skaggs weskaggs at primate.ucdavis.edu writes: Third, there is no way to change the defaults in GIMP 2.2 except by editing the C code for the jpeg plugin, but we are working on a way to do this that should apply to all plugins, and you can expect it to be available in GIMP 2.4. To followup on this old thread.. Now that GIMP 2.3 is out, I'm not sure if I'm finding this improvement in the changelog yet. Can you point out which specific change in the news file http://developer.gimp.org/NEWS is the one that includes these changes? Thank you. ___ Gimp-user mailing list Gimp-user@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
[Gimp-user] descreening plugin?
Are there any descreening plugins for the GIMP? I need to display some scanned images from printed material and would like to get rid of the dots if at all possible. I have a descreening filter on my scanner but it doesn't work very well. It needs some help. Thanks, Wayne ___ Gimp-user mailing list Gimp-user@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] sf change a colors value?
Hi, Joao S. O. Bueno Calligaris [EMAIL PROTECTED] writes: The Bad news: there are no procedures in the PDB to deal with with RGB - HSV conversion. When I needed these, I was told to write my own conversion procedure inside the script. (it was a python script, so it won't fit you). There are RGB - HSV conversion routines in libgimpcolor. Language bindings should provide this functionality. Sven ___ Gimp-user mailing list Gimp-user@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] Re: Default JPEG quality setting - where?
Hi, Antti Mkel [EMAIL PROTECTED] writes: Third, there is no way to change the defaults in GIMP 2.2 except by editing the C code for the jpeg plugin, but we are working on a way to do this that should apply to all plugins, and you can expect it to be available in GIMP 2.4. To followup on this old thread.. Now that GIMP 2.3 is out, I'm not sure if I'm finding this improvement in the changelog yet. Can you point out which specific change in the news file http://developer.gimp.org/NEWS is the one that includes these changes? It isn't there yet (remember, this is not yet GIMP 2.4). We have however already large parts of the framework that will be needed: - moved GimpConfig functionality from core into libgimpconfig - moved GimpEnumStore and GimpEnumComboBox to libgimpwidgets - moved convenience constructors for property views to libgimpwidgets Sven ___ Gimp-user mailing list Gimp-user@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
[Gimp-user] Gimp wont work anymore after font and X upgrade
Hi I upgraded to X 4.5 and the fonts that came with that. I am on Debian Sarge, 2.6.11 kernel. This is the message I get when I run GIMP. Thanks for helping Ben The Fontconfig version being used is too old! The GIMP requires Fontconfig version 2.2.0 or later. The Fontconfig version loaded by The GIMP is 2.1.0. This may be caused by another instance of libfontconfig.so.1 being installed in the system, probably in /usr/X11R6/lib. Please correct the situation or report it to someone who can. ___ Gimp-user mailing list Gimp-user@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user