Re: [Gimp-developer] Gallery maker ...

2001-05-19 Thread Branko Collin

On 18 May 2001, at 16:16, Raphael Quinet wrote:
 On Fri, 18 May 2001, Branko Collin [EMAIL PROTECTED] wrote:
 [...]
  My question is: when is a reworking of a script good enough to be
  included in the distribution? Is there some kind of policy for this?
 
 Well, if you add some features that can generally be considered useful
 and you do not remove existing features (breaking APIs), then you
 should definitely submit a patch so that the updated script can be
 included in a future release of the Gimp.

Of course it is debatable as to what can generally be considered 
useful, but then I figure I can let you guys (and gals) decide...

An added problem may be that the original author (Federico Mena 
Quintero) copyrighted the script without any license. Does that mean 
it is automatically GPL'ed, because the script is part of the 
standard GIMP distribution? I do not know if the law works that way. 

As you can see, I worked with IF statements rather than the Scheme 
version of a CASE statement, because I could not get the latter to 
work. 

The use of the changes: achieving a more realistic interlace effect. 
By giving brightness a negative value, you can get the effect of the 
scanline 'slowly' fading to darkness. Here's an example of that 
effect: http://www.planetarion.com. 

To do: graying out the brightness/contrast value if Type != 
Brightness and Type != Contrast. Can anyone tell me how to do this?

Following is the unified diff of erase-rows.scm and my version of 
that script. I changed a lot, but the script is not that long.

--- scripts\old-erase-rows.scm  Mon Dec 25 20:01:50 2000
+++ _gimp1.2.Branko Collin\scripts\erase-rows.scm   Sat May 19 18:00:26 
2001
@@ -1,4 +1,4 @@
-(define (script-fu-erase-rows img drawable orientation which type)
+(define (script-fu-erase-rows img drawable orientation which type 
rwidth bcvalue)
   (let* ((width (car (gimp-drawable-width drawable)))
 (height (car (gimp-drawable-height drawable
 (gimp-undo-push-group-start img)
@@ -6,12 +6,13 @@
 (if ( i max)
 (begin
   (if (= orientation 0)
-  (gimp-rect-select img 0 i width 1 REPLACE FALSE 0)
-  (gimp-rect-select img i 0 1 height REPLACE FALSE 0))
-  (if (= type 0)
-  (gimp-edit-clear drawable)
-  (gimp-edit-fill drawable BG-IMAGE-FILL))
-  (loop (+ i 2) max))
+  (gimp-rect-select img 0 i width rwidth REPLACE FALSE 0)
+  (gimp-rect-select img i 0 rwidth height REPLACE FALSE 
+0))
+  (if (= type 0) (gimp-edit-clear drawable))
+  (if (= type 1) (gimp-edit-fill drawable BG-IMAGE-FILL))
+  (if (= type 2) (gimp-brightness-contrast drawable bcvalue 
+0))
+  (if (= type 3) (gimp-brightness-contrast drawable 0 
+bcvalue))
+  (loop (+ i (* 2 rwidth)) max))
   (loop (if (= which 0)
0
1)
@@ -23,15 +24,18 @@
 (gimp-displays-flush)))
 
 (script-fu-register script-fu-erase-rows
-   _Image/Script-Fu/Alchemy/Erase every other Row...
-   Erase every other row/column with the background color
-   Federico Mena Quintero
-   Federico Mena Quintero
-   June 1997
+   _Image/Script-Fu/Alchemy/Draw Rows or Cols...
+   Draw rows/columns in background color or by adjusting 
brightness/contrast.
+   Federico Mena Quintero/Branko Collin
+   Federico Mena Quintero/Branko Collin
+   June 1997/May 2001
RGB* GRAY* INDEXED*
SF-IMAGE Image 0
SF-DRAWABLE Drawable 0
SF-OPTION _Rows/Cols '(_Rows _Columns)
SF-OPTION _Even/Odd  '(_Even _Odd)
-   SF-OPTION _Erase/Fill  '(_Erase _Fill with BG))
+   SF-OPTION _Type  '(_Erase _Fill with BG _Brightness 
_Contrast)
+   SF-ADJUSTMENT _Width of Row/Col '(1 1 8 1 10 0 1)
+   SF-ADJUSTMENT _Value of Brightn./Contr. '(0 -127 127 1 10 0 
1))
+   
 

-- 
branko collin
[EMAIL PROTECTED]
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



[Gimp-developer] Gallery maker ...

2001-05-18 Thread Fabian Frédérick

I made a gallery maker plug-in + batch convertion ...
available from : http://www.dtlord.com/gallery

Somebody could tell me who to contact in order to put it in Gimp
distribution ?

Regards,
Fabian



-- 
Sent through GMX FreeMail - http://www.gmx.net

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] Gallery maker ...

2001-05-18 Thread Raphael Quinet

On Fri, 18 May 2001, Fabian Frédérick [EMAIL PROTECTED] wrote:
 I made a gallery maker plug-in + batch convertion ...
 available from : http://www.dtlord.com/gallery
 
 Somebody could tell me who to contact in order to put it in Gimp
 distribution ?

You have done it already by posting your message to this list...

Since your plug-in is a Perl script, Marc should probably be the
one who decides if your script is worth including in the next
release or not.  Most Perl-Fu contributors are on this list, so
they have probably read your message.

By the way, it would be nice to include some examples of your
script's output in your web pages, so that anyone (e.g., me) who
is too lazy to install it can see if it is worth trying or not.

-Raphaël

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] Gallery maker ...

2001-05-18 Thread Branko Collin

On 18 May 2001, at 14:00, Raphael Quinet wrote:
 On Fri, 18 May 2001, Fabian Frédérick [EMAIL PROTECTED] wrote:

[new script]
  Can somebody tell me who to contact in order to put it in Gimp
  distribution ?

 You have done it already by posting your message to this list...

 Since your plug-in is a Perl script, Marc should probably be the
 one who decides if your script is worth including in the next
 release or not.  Most Perl-Fu contributors are on this list, so
 they have probably read your message.

On a related note: recently, a web designer asked in a Usenet news
group (nl.internet.www.ontwerp) how to achieve a certain effect with
the GIMP. I added a couple of lines of code to an existing script to
help him.

My question is: when is a reworking of a script good enough to be
included in the distribution? Is there some kind of policy for this?
As I understand, script-fu is also there so that anybody can write up
their own scripts for their own purposes. Should I send the changed
script to the original author with an explanation of what the changes
are for?

--
branko collin
[EMAIL PROTECTED]
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] Gallery maker ...

2001-05-18 Thread Stefan Stiasny

hi!

 I made a gallery maker plug-in + batch convertion ...
 available from : http://www.dtlord.com/gallery
just a few points:

- add some errorhandling please! (e.g. check if the files you try to
  open can be read/written ...)
  just played around with it for the last ten minutes and couldn't til it
  got it work for the first time ...
- the script overwrites the original files without a warning ...
  not so nice ;)
- the html file should probably reside in the same directory as the
  pictures, not in my home dir
- the interface aint very intuitive either ... that
  Gallery () Yes () No radio button doesn't make any sense to me
- some more control over the created html would be nice ... maybe some
  template for header/footer
- gimp can handle other image formats than jpg, why not make use of it?
- why does the plugin register in Image/gallery_maker, it has nothing
  to do with the active image and should be somewhere in Toolbox/Xtns/...

cheers
sc

-- 

Stefan Stiasny [EMAIL PROTECTED]
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer