Re: [Gimp-developer] Proposal for erasing background from an image

2017-03-04 Thread Ell via gimp-developer-list



On 03/02/2017 02:24 AM, John Tapsell wrote:

Hi all,


  I'm guessing this is frowned on but I've written this up on my blog here:


Absolutely not frowned upon :)


...


Hate to be a buzzkill, but it's already doable: clone tool + color erase 
mode + registered alignment.


Note that this technique might not work as well as you imagine.  For 
each pair of background/output colors, what you essentially do is pass a 
ray from the background color, towards the output color, and look for 
the ray's intersection with the hull of the RGB cube.  This point is 
your foreground color, and the alpha is the relative position of the 
output color along the background-foreground segment.  This means, that 
all resulting foreground colors are on the hull of the color cube (i.e., 
fully saturated, including black, or full-value), and, conversely, all 
output colors that aren't on the hull result in semi-transparent 
foreground pixels.


Something that might be fun to try is this: suppose you have two pairs 
of background/background+foreground images, where the backgrounds are 
different, while the foreground object aligns (as much as possible) 
across the two images  Then, at each pixel, you have two 
background->output rays, and, ideally, the true foreground color is 
their point of intersection.  Most chances are that the rays won't 
intersect exactly, because of imperfect alignment/differences in color, 
but you can still look for the pair of points, one along each ray, that 
minimize the distance between each other; each one would be the 
foreground color for the corresponding image pair.


That being said, I imagine you'd need such a controlled environment to 
get good results with this, while there are usually simpler 
alternatives, that this strikes me as something that will only be useful 
is very specialized cases.


--
Ell
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] Transformation obeying layer blending?

2017-03-04 Thread C R
The bad news is that opaque is still the default, so you have to take
time to adjust the opacity mode each and every time you restart GIMP.

Thus, if you want to transform the layer in relation to what's under
it, you have to follow these steps:

1.Start the transform (scale, rotate, unified transform, etc.)
2.Hide the current layer.
3.Adjust the opacity of the transformation preview in the transform
tool options.
4.Set grid to zero lines
5.complete transformation
6.Un-hide layer to see the results.

Additionally, you have to do this for each tool you want to use for
transforming at least once per gimp session.

This is a lot of work, when all you want to do is see what's under
your transformation while transforming.

The steps could be reduced dramatically by changing some of gimps defaults:

1.Start the transformation (GIMP automatically sets transforming layer
display to hidden. This is necessary to see the result of your
transformation in can see relation to what's below it. GIMP could also
set the transform visibility to 75% opacity by default, giving an even
better view of what the transformation is covering up. GIMP should
hide grid lines by default during transformation unless the user asks
for them. They have only ever really gotten in the way, and I have yet
to find any good use for them.)
2.Complete the transformation (GIMP unhides the layer, thus showing
the transformation in its complete state at full opacity)

So as you can see, this would cut down the work the user has to do a
lot when transforming. It would also bring GIMP's transforming into
the same ease of use as every other graphics program I've ever used
professionally. :) After having lived with it like this every working
day for the last 6 years, I have to say, it's still one of my biggest
gripes about GIMP's GUI. Can we fix it? Please? Pretty pretty please?
:)

-C



On Sat, Mar 4, 2017 at 4:26 PM, Peter O'Regan  wrote:
> I see what you describe in 2.8 and I agree it would be useful. And
> fortunately, the development 2.9 build contains an opacity control in the
> transformation tools to do just that! =)
>
> Peter
>
> On Thu, Mar 2, 2017 at 6:06 AM, Tobiasz Karoń  wrote:
>
>> Hi!
>>
>> When doing transformations (scale, rotation, perspective transform) the
>> transformed layer "pops out" and transformed part of the image is fully
>> opaque and drawn on top of everything else together with the transfomation
>> gizmo/controls/grid.
>>
>> Sometimes I'd like to be able to make this semi-transparent to be able to
>> align one layer to another, laying underneath it.
>>
>> Sometimes I use the "Difference" blending type to compare two layers and
>> align stuff precisely. For translation I can use the arrow keys and the
>> blending works, but for perspective transform, scaling or rotation - I
>> can't use my layer's blending while manipulating the transfomation, and
>> that'd be super useful at times.
>>
>> What do you think?
>>
>> --
>> - Tobiasz 'unfa' Karoń
>>
>> http://soundcloud.com/unfa
>> ___
>> gimp-developer-list mailing list
>> List address:gimp-developer-list@gnome.org
>> List membership: https://mail.gnome.org/mailman/listinfo/gimp-
>> developer-list
>> List archives:   https://mail.gnome.org/archives/gimp-developer-list
>>
> ___
> gimp-developer-list mailing list
> List address:gimp-developer-list@gnome.org
> List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
> List archives:   https://mail.gnome.org/archives/gimp-developer-list
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] Transformation obeying layer blending?

2017-03-04 Thread Peter O'Regan
I see what you describe in 2.8 and I agree it would be useful. And
fortunately, the development 2.9 build contains an opacity control in the
transformation tools to do just that! =)

Peter

On Thu, Mar 2, 2017 at 6:06 AM, Tobiasz Karoń  wrote:

> Hi!
>
> When doing transformations (scale, rotation, perspective transform) the
> transformed layer "pops out" and transformed part of the image is fully
> opaque and drawn on top of everything else together with the transfomation
> gizmo/controls/grid.
>
> Sometimes I'd like to be able to make this semi-transparent to be able to
> align one layer to another, laying underneath it.
>
> Sometimes I use the "Difference" blending type to compare two layers and
> align stuff precisely. For translation I can use the arrow keys and the
> blending works, but for perspective transform, scaling or rotation - I
> can't use my layer's blending while manipulating the transfomation, and
> that'd be super useful at times.
>
> What do you think?
>
> --
> - Tobiasz 'unfa' Karoń
>
> http://soundcloud.com/unfa
> ___
> gimp-developer-list mailing list
> List address:gimp-developer-list@gnome.org
> List membership: https://mail.gnome.org/mailman/listinfo/gimp-
> developer-list
> List archives:   https://mail.gnome.org/archives/gimp-developer-list
>
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] Proposal for erasing background from an image

2017-03-04 Thread John Tapsell
On 3 March 2017 at 07:22, Ofnuts  wrote:

> On 02/03/17 10:05, Simon Budig wrote:
>
>> John Tapsell (johnf...@gmail.com) wrote:
>>
>>> So to restate this again - I want to know how to change the top layer
>>> $latex src$ so that I can have the maximum possible alpha without
>>> changing
>>> the final visual image at all.  I.e. remove as much of the background as
>>> possible from our foreground+background image.
>>>
>> This is what color-to-alpha does. Except that it uses a constant color
>> for the whole image. It might be interesting to convert this to a gegl
>> op that takes two input drawable and picks the "background color" from
>> each corresponding pixel in the background image.
>>
>> Should be an easy fun hack. Who wants to take it?
>>
>> Bye,
>>  Simon
>>
>> Fun hack, but would it be useful in practice? Do we want the lion to be
> partially transparent because its hair is more or less the color of the dry
> grass (with some help from Darwin). Try the two pictures in difference
> mode, and check all the places that are near black.


This is why I was suggesting that we do it with an option for the eraser.
So that the user can have that manual control over it.   How hard would it
be to do this with the erasure tool?

Thanks,

John



> ___
> gimp-developer-list mailing list
> List address:gimp-developer-list@gnome.org
> List membership: https://mail.gnome.org/mailman
> /listinfo/gimp-developer-list
> List archives:   https://mail.gnome.org/archives/gimp-developer-list
>
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[Gimp-developer] Transformation obeying layer blending?

2017-03-04 Thread Tobiasz Karoń
Hi!

When doing transformations (scale, rotation, perspective transform) the
transformed layer "pops out" and transformed part of the image is fully
opaque and drawn on top of everything else together with the transfomation
gizmo/controls/grid.

Sometimes I'd like to be able to make this semi-transparent to be able to
align one layer to another, laying underneath it.

Sometimes I use the "Difference" blending type to compare two layers and
align stuff precisely. For translation I can use the arrow keys and the
blending works, but for perspective transform, scaling or rotation - I
can't use my layer's blending while manipulating the transfomation, and
that'd be super useful at times.

What do you think?

-- 
- Tobiasz 'unfa' Karoń

http://soundcloud.com/unfa
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list