subscribe gimp-developer

2000-05-16 Thread João Moreira de Sá Coutinho

 



Is "Add alpha channel" really necessary?

2000-05-16 Thread Raphael Quinet

I just saw an article in comp.graphics.apps.gimp (in the thread with
the subject "White balance tool?") that starts describing a method
with these words: "use the color picker on the 'white' color,
duplicate the background layer, delete the original, add a layer..."
I had to read that twice to understand what he was trying to to.  Why
does he duplicate the background layer and then delete the original
immediately afterwards?  Well, the reason is simple: this is the
easiest and fastest way to add an alpha channel to the background
layer.  If you haven't assigned a shortcut key to "Layers -> Add Alpha
Channel", then it is faster to click on the buttons to duplicate the
layer, re-select it, and click on the trash can.

So although the "right" way to add an alpha channel to the background
layer is to use "Layers -> Add Alpha Channel", it looks like many
users prefer to rely on a side-effect of some other features that are
easier to use and understand.  Even if this is ridiculous from a
developer's point of view (think about the waste of CPU cycles and
memory to duplicate and then delete the tiles), it makes sense for the
users.  And this probably shows that there is a problem with this
concept (as Marc mentioned in a recent message).

Why do we need "Add alpha channel" anyway?  I understand that if you
are working only with single-layer RGB images (not RGBA), it is better
to have only the R,G,B components in order to save memory and
processing time.  But as soon as there is more than one layer in the
image, is there any reason to keep the background layer as RGB instead
of promoting it automatically to RGBA?  Why do we need to have a Tip
of the Day that tells the user to add an alpha channel, instead of
doing this automatically?

It should be easy add an alpha channel to the background layer as soon
as a second layer is added to the image.  Is there a reason why this
should not be done automatically?

I think that it would make things easier to understand for the user.
Making the background layer "special" is not very intuitive.  For
example: create a new image, draw something in the background layer.
Then add a new layer and draw something there.  Now make a selection
and use Edit->Clear.  If you do that in the new layer, this makes the
selected area transparent.  If you do that in the background layer, it
fills that area with the background color... until you select "Add
Alpha Channel", of course.  But you have to read the tips in order to
know that.  It would be better to make all layers behave in the same
way.  Promoting the background layer automatically would ensure that
an RGBA image has only RGBA layers, while an RGB image has only one
RGB layer (this could also make some code simpler, by removing some
tests on the layers' type).

What do you think?

I would even go as far as removing the "Add Alpha Channel" option from
the menus, and suggest that the prefered method to add transparency to
an image that has only one layer is to add a new layer, even if it is
deleted immediately.  This is not worse than the method used now by
some users (duplicate and delete the original) and I think that it
would be more intuitive to some users.

-Raphael




Re: Is "Add alpha channel" really necessary?

2000-05-16 Thread Jens Lautenbacher

[EMAIL PROTECTED] (Raphael Quinet) writes:

> [about not making background special wrt alpha]
>
> What do you think?

YES please. this is simply annoying.
 
> I would even go as far as removing the "Add Alpha Channel" option from
> the menus, and suggest that the prefered method to add transparency to
> an image that has only one layer is to add a new layer, even if it is
> deleted immediately.  This is not worse than the method used now by
> some users (duplicate and delete the original) and I think that it
> would be more intuitive to some users.

I would say, simply make a layer by default have alpha always... I
know I know it's more memory for that 0.001 % of cases where people
start with one background layer and stick to one the whole time,
without using alpha

jtl




Re: Is "Add alpha channel" really necessary?

2000-05-16 Thread Carey Bunks


   > [about not making background special wrt alpha]
   >
   > What do you think?

   YES please. this is simply annoying.

   > I would even go as far as removing the "Add Alpha Channel" option from
   > the menus, and suggest that the prefered method to add transparency to
   > an image that has only one layer is to add a new layer, even if it is
   > deleted immediately.  This is not worse than the method used now by
   > some users (duplicate and delete the original) and I think that it
   > would be more intuitive to some users.

   I would say, simply make a layer by default have alpha always... I
   know I know it's more memory for that 0.001 % of cases where people
   start with one background layer and stick to one the whole time,
   without using alpha

I suspect that there is a very good reason for having a default background
layer without alpha -- although I'm not sure I know what it is ;-)

I seem to remember that this is the way PhotoShop does it (I'm going
to check on this later tonight), and that would probably be a good
enough reason not to fiddle with this.  However, I'm thinking about
what usability reasons might be invoked for not changing this behavior
of layer operation.  Here's one line of thought...

There are times when having no alpha channel is a very good thing, and
this is why the function Flatten Image exists.  Since there are file
formats that don't support transparency, it is important that the user
be able to decide when, and how to flatten the image (i.e., remove the
alpha channel).  Furthermore, imagine you are a user that doesn't make
use of layers or transparency.  Under these conditions, having a
default background layer with no alpha channel is not a bother but a
convenience.

In fact, there may be other reasons not to change this behavior that I
haven't thought of.  I would suggest that before jumping to change
this traditional behavior that it undergo some serious examination.
If PhotoShop does it this way, we should try to understand why before
changing.

Carey Bunks


Dr. Carey Bunks 
Senior Scientist
BBN Technologies
70 Fawcett St, 15/2A
Cambridge,  MA 02138
tel: 617-873-3028  fax: 617-873-2918
email:  [EMAIL PROTECTED]  




Re: Is "Add alpha channel" really necessary?

2000-05-16 Thread David Necas

> ...
>
> It should be easy add an alpha channel to the background layer as soon
> as a second layer is added to the image.  Is there a reason why this
> should not be done automatically?
> 
> I think that it would make things easier to understand for the user.
> Making the background layer "special" is not very intuitive.
>
> ...
>
> What do you think?

NO, please.

`Special' background layer maybe isn't very intuitive, but automatical
promoting has the same problem: it's based on a side-effect and it's not
intuitive too. We would have to explain (in some new Gimp tip) why
properties of background layer chage when you add second layer. Layers
_definitely_ shouldn't be changed by any action on other layers.

Adding automatically alpha channel to everything seems to be a better
solution, but imagine you open some image in a not-alpha-capable format,
change a few pixels and try to save it and Gimp will start asking you
about exporting, and flattening it. That's not anything I would call
intuitive behaviour.

The only good solution is probably to make `Add Alpha Channel' more
intuitive. The user should _see_ the background layer is special---lacks
something---and there must be some obvious way how to add it. (But is
there an obvious way how to manage this?)

Yeti


Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!





Re: Is "Add alpha channel" really necessary?

2000-05-16 Thread Jon Winters

On Tue, 16 May 2000, David Necas wrote:

> > Making the background layer "special" is not very intuitive.
> >
> > ...
> >
> > What do you think?
> 
> NO, please.

 
> The only good solution is probably to make `Add Alpha Channel' more
> intuitive. The user should _see_ the background layer is special---lacks
> something---and there must be some obvious way how to add it. (But is
> there an obvious way how to manage this?)

How about changing the layers dialog box so the background layer appears
solid and the layers with alpha have a gradient-to-checker background.
This way one can tell at a glance if a layer has alpha or not.

This is hard to describe.  If anyone is interested I'll mark up a
screengrab of how this might look.


--
Jon Winters http://www.obscurasite.com/

   "Everybody loves the GIMP!" 
  http://www.gimp.org/




Re: Is "Add alpha channel" really necessary?

2000-05-16 Thread Raphael Quinet

On Tue, 16 May 2000, Jens Lautenbacher <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (Raphael Quinet) writes:
> > I would even go as far as removing the "Add Alpha Channel" option from
> > the menus, and suggest that the prefered method to add transparency to
> > an image that has only one layer is to add a new layer, even if it is
> > deleted immediately.  This is not worse than the method used now by
> > some users (duplicate and delete the original) and I think that it
> > would be more intuitive to some users.
> 
> I would say, simply make a layer by default have alpha always... I
> know I know it's more memory for that 0.001 % of cases where people
> start with one background layer and stick to one the whole time,
> without using alpha

Hmmm...  No, I think that it makes sense to create single-layer images
without alpha.  If you are working mostly with image formats that do
not support alpha (i.e. JPEG, BMP, PPM, PCX) or if you are not
interested in having transparency anyway, then you probably want the
Gimp to behave as most of the old painting programs behaved: no
layers, no transparency, and "clearing" an area means to fill it with
the background color.  It also saves some memory if you are using the
Gimp to do some color corrections or simple retouching on huge images
(e.g. your photo collection or some scanned images).

But on the other hand, as soon as you start working with multiple
layers, then you need to work with transparency (and to understand the
concepts involved).  That's why I would promote the background layer
to RGBA when you add a second layer.

I still haven't found a good reason to keep the background layer
"special" when the image contains multiple layers.  If the only
reasons are historical or to copy the features of some well-known
commercial program, then we could have this as an option in the
gimprc (but IMHO the default should be to promote the background
layer automatically).

-Raphael




Re: Is "Add alpha channel" really necessary?

2000-05-16 Thread Alan


May I make a humble suggestion.
Change File->New to allow users to select a Fill Type of either

Background w/o alpha 
Background w/ alpha

Then users can select what they want to begin with. Flatten and Add Alpha
Channel can still exist as is in the Layers menu. No automatic
behind-the-scenes switching need be done. Power users have full control and
newbies can simply select Background w/ alpha if they wish. 

Alan



Re: Is "Add alpha channel" really necessary?

2000-05-16 Thread Jens Lautenbacher

[EMAIL PROTECTED] (Raphael Quinet) writes:

> On Tue, 16 May 2000, Jens Lautenbacher <[EMAIL PROTECTED]> wrote:
> > 
> > I would say, simply make a layer by default have alpha always... I
> > know I know it's more memory for that 0.001 % of cases where people
> > start with one background layer and stick to one the whole time,
> > without using alpha
> 
> I still haven't found a good reason to keep the background layer
> "special" when the image contains multiple layers.  If the only
> reasons are historical or to copy the features of some well-known
> commercial program, then we could have this as an option in the
> gimprc (but IMHO the default should be to promote the background
> layer automatically).

One reason is the same as you gave for the single layer case: clearing
means filling with a choosen background layer.

So having a stack of layers with a dedicated background layer in a
dedicated color makes sense, as clearing on the upper layers will
clear to alpha, while it will clear to the background color on the
background layer






Re: Is "Add alpha channel" really necessary?

2000-05-16 Thread Raphael Quinet

On Tue, 16 May 2000, Jens Lautenbacher <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (Raphael Quinet) writes:
> > I still haven't found a good reason to keep the background layer
> > "special" when the image contains multiple layers.  If the only
> > reasons are historical or to copy the features of some well-known
> > commercial program, then we could have this as an option in the
> > gimprc (but IMHO the default should be to promote the background
> > layer automatically).
> 
> One reason is the same as you gave for the single layer case: clearing
> means filling with a choosen background layer.
> 
> So having a stack of layers with a dedicated background layer in a
> dedicated color makes sense, as clearing on the upper layers will
> clear to alpha, while it will clear to the background color on the
> background layer

No, this is precisely what I consider to be counter-intuitive.

IMHO, "clear with bg color" only makes sense if you do not understand
or are not interested in the concepts of layers and transparency.  So
this can be good if you are mostly working with "flat" image formats.

But if you start working with layers and transparency, then I would
prefer to have a consistent behaviour for "clear": it should always
make the selected area transparent, in all layers.

If you really want "Edit->Clear" to reveal some color when you use it
in the background layer of a multi-layered image, you always have the
opportunity to add another layer below the one that was your
background.  This is probably easier to understand than having some
special properties on one layer.  (Anyway, in that case I would prefer
to simply use "Edit->Fill with BG" or to drag the background color
into the selection.)


On Tue, 16 May 2000, Alan <[EMAIL PROTECTED]> wrote:
> May I make a humble suggestion.
> Change File->New to allow users to select a Fill Type of either
> 
> Background w/o alpha 
> Background w/ alpha
> 
> Then users can select what they want to begin with. Flatten and Add Alpha
> Channel can still exist as is in the Layers menu. No automatic
> behind-the-scenes switching need be done. Power users have full control and
> newbies can simply select Background w/ alpha if they wish. 

This would not solve the most common problem which is: load an
existing JPEG image, add a layer to it, then be confused because you
cannot lower this layer below the background layer or because
"Edit->Clear" and the Eraser tool behave differently on the two layers.

Note that I definitely do not want to remove the "Flatten Image"
option because it is very useful: as Carey Bunks said in a previous
message, the user must be able to choose when and how an image is
flattened before saving it.

-Raphael




Zoom Tool

2000-05-16 Thread Piers Cornwell

Hi,

I was wondering whether the following is a bug that needs fixing before 1.2 (i
thought i'd check here first before adding to the bug list).

When you first select the zoom tool, it is not possible to toggle zoom in/zoom
out by pressing/releasing Ctrl. This shortcut only works after the zoom tool
has been used at least once (i.e. select zoom tool, click image (zoom in),
press ctrl+click image (zoom out).

To reproduce:
1. Select a tool other than the zoom tool.
2. Select the zoom tool.
3. Press Ctrl+Click Image (this should invert the current zoom status but
doesn't).

GIMP Version: CVS from just before 1.1.22

This bug is kinda hard to explain, so sorry about the dodgy wording above!!

Thanks,

-Piers


Get free email and a permanent address at http://www.netaddress.com/?N=1



Re: Gimp Perl Server

2000-05-16 Thread Marc Lehmann

On Sun, May 14, 2000 at 10:05:04PM +0200, Marc Lehmann <[EMAIL PROTECTED]> wrote:
> On Sun, May 14, 2000 at 06:55:22AM -0700, Michael Lee <[EMAIL PROTECTED]> wrote:
> > I've been trying to get the following script to work...
> 
> Try to rwrite it using the newer network-api (i.e. like this):
> 
>sub net
>{
>}

of course, wrapping it into "sub net {" was bogus. Just do it without the
additionl net.

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED] |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 |



Re: Is "Add alpha channel" really necessary?

2000-05-16 Thread Marc Lehmann

On Tue, May 16, 2000 at 05:42:54PM +0200, David Necas <[EMAIL PROTECTED]> 
wrote:
> NO, please.
> 
> `Special' background layer maybe isn't very intuitive, but automatical
> promoting has the same problem: it's based on a side-effect and it's not

gimp automatically promotes layers on a variety of occasions, without
this being a problem so far.

If an operation wasn't possible before and requires me to do an additional
step (that doesn't loose data), I don't see a problem with making it
automatic. If the user wants to raise the layer he should be able to do
it.

> change a few pixels and try to save it and Gimp will start asking you
> about exporting, and flattening it. That's not anything I would call
> intuitive behaviour.

Gimp should support trained users in the first place. If a user has no
idea what flatten is, or which format supports alpha or not, then greying
out menu entries that could confuse him is not particularly useful.

The only principle problem is that code has to be written to support either
way.

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED] |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 |



Re: Is "Add alpha channel" really necessary?

2000-05-16 Thread Garry R. Osgood

Carey Bunks wrote:

>
> I seem to remember that this is the way PhotoShop does it (I'm going
> to check on this later tonight), and that would probably be a good
> enough reason not to fiddle with this. 

Photoshop furnished Gimp with UI scaffold, but Wilbur is a big boy
now and can have his own human factors. 

Grant the "move layer to top of stack" with an implcit "Add alpha to 
Channel". 

Case 1: The user retains single layer. It should default to RGB
because the user likely to be thinking in alphaless mode.

Case 2: The user has two or more layers. The user has clearly 
switched to alpha mode thinking (s/he is compositing) and is likely
to make various "holes" in layers 2, 3, ...

*But not necessarily layer 1* We should not set alpha on layer
1 without permission from the user. The user may be an old Gimp
hand and has grown accustomed to the background layer's native
opacity. Maybe not, but we should not be presumptuous.

However, once the user makes the background active AND 
clicks on the stacking order arrow to move the so-called
background layer up the stack, s/he has clearly switched to
alpha mode thinking on the background layer itself. So
rather than ghosting that arrow, and denying the user 
permission to move the background layer, we give that 
arrow the special property of "promoting" RGB backgrounds
to RGBA layers the moment the user is obviously attempting
to "lift" it off the background.

This would turn the arrow into a convenient, one click,
Add Alpha function exactly when the user needs it.

I imagine Mitch is coding it already, ;) so I hasten to
point out that we are still in feature freeze.

My two U. S. cents.

Be good, be well

Garry Osgood



Re: Is "Add alpha channel" really necessary?

2000-05-16 Thread Carol Spears

When I started using the Gimp, I was about as stupid as they come.  I
even learned linux (what little I know) from the Gimp up.  I am not as
stupid about the Gimp now, but that is about as far as I will go.

I learned the word alpha from that bottom layer being what it is.  

It has become pesky to me as of late.  If the bump map filter would open
up on the bottom layer instead of the top, alot of the peskiness would
go away.  

Sometimes I forget that it is special and waste time "erasing things
white" until I handle it.  After reading the dev mail tonight, I shall
no longer duplicate and remove the layer.  But I go back and forth on
how I handle it and usually I choose according to where the mouse is
closer to, the layers dialog (duplicate and delete) or the image
(Image>Alpha etc).  Doing it the right way has more steps and more
searching menus. It takes more human effort.

The very best thing for me --the stupid but teachable user-- would to
have an option in the preferences to open images in alpha or not. But
default with the image opening as is.  I am glad that the Gimp came like
it did, but now I would like to have the option to turn it off.

Thanks for your time and thanks for your very cool program.

-- 

 __ _ __  ___
/ _| '  \(_-<  Why use Windows, since there is a door?  
\__|_|_|_/__/  -- Andre Fachat