Re: [Gimp-developer] Icon sizes required

2016-02-23 Thread Jehan Pagès
 but  Hi Kevin,

On Sun, Feb 21, 2016 at 11:52 PM, Kevin Payne  wrote:
> 
>>From: Jehan Pagès 
>>Sent: 21 February 2016 17:24
>>To: Kevin Payne
>>Cc: gimp-developer-list@gnome.org
> Subject: Re: [Gimp-developer] Icon sizes required
>
>>Hi,
>
> On Sun, Feb 21, 2016 at 1:23 PM, Kevin Payne  wrote:
>> But that is partly my point - The original icons are apparently the wrong 
>> size, so my question stands: How to determine what sizes are required?
>>
>
>>I had already noticed this discrepancy in our code. We are actually
>>requesting for a GTK_ICON_SIZE_BUTTON which is 20x20 in GTK+2
>>(interestingly in GTK+3, it is a 16x16). Yet the icons in the legacy
>>color icon theme are 22x22 (not 24x24); and since the default
>>acceptable "threshold" is 2 pixels, when requesting a 24x24 icons,
>>GTK+ gets the available 22x22 tool icons instead.
>
>>I'm not sure icons are actually re-scaled though. I think GTK+ simply
>>uses the smaller 22x22 icons as is, instead of the expected 24x24,
>>that's all. Not trying forcingly to match expectations. Though I
>>actually wondered as well, since if they were in fact rescaled, that
>>basically means our default theme had been providing definitely
>>not-pixel-perfect all along.
>
>>Jehan
>
> Just to be clear, I'm only referring to the gimp-gravity-* icons when I say 
> they are 24x24

Indeed these icons are requested as GTK_ICON_SIZE_BUTTON too (cf.
app/tools/gimpalignoptions.c).

> As for scaling - in 2.8, I agree that scaling doesn't take place and that 
> icons are used the size they are provided at, which is where the problem in 
> this bug comes in: https://bugzilla.gnome.org/show_bug.cgi?id=739469
>
> However in 2.9, using the icon theme mechanism, if an icon isn't provided at 
> the required size (+/- the tolerance, thanks I didn't know about that) then 
> scaling of a different size is performed: http://imgur.com/98D3SLA

Yes the tolerance thing is written in the spec. The default value is 2
(I had not checked the code, but it seems to be the case here), but an
icon theme creator can set another value in the index.theme if wished.

> And the size of the GTK named sizes is still controlled by the theme (until 
> the change to GTK3):
> gtk-icon-sizes = "panel-menu=10,10 : panel=10,10 : gtk-button=20,20 : 
> gtk-large-toolbar=24,24 : gtk-menu=16,16 : gtk-small-toolbar=18,18 : 
> gtk-dnd=32,32 : gtk-dialog=48,48"

Oh so if I write this down in the gtkrc of a theme, then the meaning
of "button size", "menu size", and so on, changes?
I think I read something about the fact that the meaning of these
constants may change in the API doc, but there was no detail how this
was done. Thanks for telling. If that was not what you meant, then I'd
love an explanation. :-)

> So it's outside the control of the creator of the icon theme.

Yes. And it's also a little annoying for us, in my opinion. Well not
really since in most case, nobody would change this. But they could.

> At this point I think I might have to give up on the idea of pixel aligned 
> icons as it looks like the icon theme mechanism is creating an unmanageable 
> mess, which is a pity because it's a nice idea.

If it needs improvement, maybe it could be possible to update the spec
for icon themes (in some distant future, then it's better to start
soon :p). In any case, I think it is possible to do a little better.
Even though "perfect" is maybe too much work, we can already make
"much better". :-)

Jehan

> Kevin
> ___
> 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] Border artifact from using nohalo to scale a layer with an alpha channel

2016-02-23 Thread Øyvind Kolås
In general it is better to open new bug-reports, rather than re-open
old ones seeming similar - long threads of possibly different problems
discussed in comments makes it hard to follow progress of an issue.
This issue seems like it might already have a bug though bug #698468.

/pippin

On Tue, Feb 23, 2016 at 12:12 AM, Elle Stone
 wrote:
> The following three bugs are closed, but there still seems to be a related?
> new? bug with nohalo scaling (and probably lohalo, but not with cubic or
> linear):
>
> https://bugzilla.gnome.org/show_bug.cgi?id=634901
> Bug 634901 - Resizing an image with alphachannel creates 1 pixel border down
> and right
>
> https://bugzilla.gnome.org/show_bug.cgi?id=698601
> Bug 698601 - scaling up without alpha adds several-pixel gradient border
>
> https://bugzilla.gnome.org/show_bug.cgi?id=734378
> Bug 734378 - Image manipulation (scale,rotate) may cause vertical image
> artefacts
>
> Scaling up or down using nohalo produces a partially transparent border
> around the layer if the layer has an alpha channel. This is a long-standing
> issue that still obtains (at least scaling down has produced the edge
> artifact for a long time, bug 698601 describes the opposite situtation for
> scaling up).
>
> I only just discovered that removing the alpha channel at least sometimes
> allows to scale a layer without creating the edge artifacts. So I'm not sure
> if removing the alpha channel always allows to scale without creating edge
> artifacts.
>
> This bug was confirmed using babl/GEGL/GIMP updated today.
>
> Should I file a new bug report? or maybe instead open one of the old bug
> reports?
>
> Elle
> ___
> 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