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: . 

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"
-   _"/Script-Fu/Alchemy/Erase every other Row..."
-   "Erase every other row/column with the background color"
-   "Federico Mena Quintero"
-   "Federico Mena Quintero"
-   "June 1997"
+   _"/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



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

2001-05-18 Thread Raphael Quinet

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.

> 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?

There are basically four ways to submit your patches:
1 - Send them to the original author.  But you should first try to
estimate when this author made his/her last contribution to the Gimp
because he might not be active anymore.  Especially for Script-Fu,
many scripts have been updated in CVS since the original author
released them.  In that case, the other three solutions are more
appropriate because the original author might not have the latest
version of the script.
2 - Post the patch to this list.  The patch should be in "diff -u" format.
This only applies to small patches.  If your patch exceeds a few dozen
lines, then you should consider the other solutions.  People do not
like to receive big files in their mailboxes if they haven't asked for
them.
3 - Submit a new bug report to http://bugzilla.gnome.org/ describing what
your patch does, set its severity to "enhancement" and attach the
patch file to the bug report using the "create attachment" feature.
4 - Store your patch in the incoming directory of ftp.gimp.org and send a
README file to the ftp admins, as described in the message that you
will get when you enter the incoming directory.

-Raphael

___
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 /gallery_maker, it has nothing
  to do with the active image and should be somewhere in /Xtns/...

cheers
sc

-- 

Stefan Stiasny <[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 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 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



[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