need help with bug #464466 (downscaling quality)

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

need help with bug #464466 (downscaling quality)

by Sven Neumann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Geert has made some progress on the patch to improve downscaling quality
in GIMP (http://bugzilla.gnome.org/show_bug.cgi?id=464466) and we would
like to include this change for GIMP 2.6. But in order to do this, we
need to know if the approach taken with this patch is indeed an
improvement over the current state. We also need to check that the code
does not break for certain cases. It would be awesome if the main
developers could get some help with this task.

What is needed is a set of examples images of different type
(photographic / graphic design, RGB / grayscale, flat / translucent).
This set of images should undergo various scale operations (much
smaller, smaller, a little bit smaller, a little bit larger, larger,
much larger) using the different available interpolation methods. This
needs to be done before and after applying the patch attached to this
bug report. Note that this requires GIMP 2.5.1 or preferably an SVN
checkout of trunk.

The results of this then should be presented in a comparison chart that
allows us to judge if the patch should be applied for 2.6 or not. Would
be nice to have this on a web page or perhaps as a PDF file. Do we have
any volunteers for this task?


Sven


_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by Sven Neumann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Tue, 2008-07-08 at 08:25 +0200, Sven Neumann wrote:

> Geert has made some progress on the patch to improve downscaling
> quality in GIMP (http://bugzilla.gnome.org/show_bug.cgi?id=464466) and
> we would like to include this change for GIMP 2.6. But in order to do
> this, we need to know if the approach taken with this patch is indeed
> an improvement over the current state. We also need to check that the
> code does not break for certain cases. It would be awesome if the main
> developers could get some help with this task.

Since no one has offered to help with this bug so far, I see two
options:

(1) postpone this change for 2.8
(2) commit the changes and release them with 2.5.2, revert if needed

I am in favor of option (2). But this has the potential of delaying the
2.6 release. It's quite likely that just committing the code and
releasing it in a developer release is not going to give it the
systematic testing that it should get. So I would still prefer if
someone would volunteer for this job...


Sven


_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by Liam R E Quin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 2008-07-15 at 00:32 +0200, Sven Neumann wrote:

> Since no one has offered to help with this bug so far, I see two
> options:
>
> (1) postpone this change for 2.8
> (2) commit the changes and release them with 2.5.2, revert if needed

I can certainly offer images, I'm maxed out with work & meetings & stuff
this month though, so apart from that I don't have spare cycles probably
until the end of the month.  Sorry for not replying first time round.

Liam

--
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by Sven Neumann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Tue, 2008-07-15 at 09:49 -0400, Liam R E Quin wrote:

> I can certainly offer images, I'm maxed out with work & meetings & stuff
> this month though, so apart from that I don't have spare cycles probably
> until the end of the month.  Sorry for not replying first time round.

I don't think images are the problem. What we need is a nice comparison,
somewhat similar to http://users.telenet.be/geert.jordaens/ (except that
this page was not created using the latest version of the code and that
the links to the full-scale versions of the images appear to be broken).
But thanks for your offer. Perhaps if we find someone to do the
comparison, he/she will come back to you and ask your for those images.


Sven


_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by David Gowers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I can do at least half of this task, possibly most of it.

* decide on test images:
   2 landscapes
    http://www.flickr.com/photos/hapal/2292885459/sizes/l/
    http://www.flickr.com/photos/15082599@N08/2432037855/sizes/l/ (or size o/ )
   3 portraits
    http://www.flickr.com/photos/aturkus/2091469097/sizes/l/
    http://www.flickr.com/photos/manicomi/2472143804/sizes/l/
    http://flickr.com/photos/newroz2005/9392539/sizes/o/in/pool-88292168@N00/
   1 cartoon
     http://www.flickr.com/photos/stephendl/2536595458/sizes/o/
   1 pixel art
     http://www.pixeljoint.com/pixelart/5647.htm#

* decide on tests:
  Scale down, single step:
     50% 33% 12.5%
  Scale up, single step:
    133% 150% 200% 400%
  Scale down, multiple steps
  (to 66% x 3), (to 50% x 3)
  Scale up, multiple steps
  (to 133% x 3), (to 150% x 3)


* Save results of tests before applying patch
* (probably) Save results of tests after applying patch
* Make webpage

The one thing I definitely can't do is
* Host webpage.
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by David Gowers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I've just completed producing images without the patch (using old
scaling code) for None and Linear methods.
This amounts to 2*77 = 154 images totalling 110 MB. Some of these I
plan to discard, for the cases where the old and new code produce the
same result.

One of the photos had transparency information added to it, another
which was already grey I converted to greyscale.

Remaining:
 * produce 77 images each for Cubic and Lanczos
 * (possibly) produce 77 images each for None, Linear, Cubic, and
Lanczos using the patch
 * (possibly) check whether scaling in Indexed modefor the pixel art
produces identical results to None using RGB mode
 * (possibly) make webpage.

On Wed, Jul 16, 2008 at 6:30 PM, David Gowers <00ai99@...> wrote:

> I can do at least half of this task, possibly most of it.
>
> * decide on test images:
>   2 landscapes
>    http://www.flickr.com/photos/hapal/2292885459/sizes/l/
>    http://www.flickr.com/photos/15082599@N08/2432037855/sizes/l/ (or size o/ )
>   3 portraits
>    http://www.flickr.com/photos/aturkus/2091469097/sizes/l/
>    http://www.flickr.com/photos/manicomi/2472143804/sizes/l/
>    http://flickr.com/photos/newroz2005/9392539/sizes/o/in/pool-88292168@N00/
>   1 cartoon
>     http://www.flickr.com/photos/stephendl/2536595458/sizes/o/
>   1 pixel art
>     http://www.pixeljoint.com/pixelart/5647.htm#
>
> * decide on tests:
>  Scale down, single step:
>     50% 33% 12.5%
>  Scale up, single step:
>    133% 150% 200% 400%
>  Scale down, multiple steps
>  (to 66% x 3), (to 50% x 3)
>  Scale up, multiple steps
>  (to 133% x 3), (to 150% x 3)
>
>
> * Save results of tests before applying patch
> * (probably) Save results of tests after applying patch
> * Make webpage
>
> The one thing I definitely can't do is
> * Host webpage.

I might be able to make a PDF.I suspect the smallest it could possibly
get is 20mb.
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by Liam R E Quin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2008-07-16 at 22:14 +0930, David Gowers wrote:

> > The one thing I definitely can't do is
> > * Host webpage.

I can do that if you want, although gimp.org would be better.
As long as it's under a gigabyte or so.

Here are some images that may help show some problems -- colour photos
tend to hide problems, partly because the eye sees the subject more
easily and auto-corrects flaws, and partly because the hardest thing
for rescaling is often preserving both texture and sharpness.  Of
course, most people are working with colour photos these days...)

For potential problems with vertical artifacts, see the
1600x1200 image at
http://www.fromoldbooks.org/Green-ShortHistory/pages/0187-Remains-of-Cloisters/
(I had to resize it to 1024x768 using cubic and then sharpen)

The 1518x916 one at
http://www.fromoldbooks.org/YouthsInstructer/pages/072-New-Post-Office-London/
has near-horizontal lines which are difficult.

http://www.fromoldbooks.org/YouthsInstructer/pages/181-Dunluce-Castle/181-Dunluce-Castle-q59-1447x923.jpg
has diagonals and is an RGB image instead of grayscale.

http://www.fromoldbooks.org/ThomasBewick-WoodEngravings/pages/30-the-horse/1790x1307-q75.html
is a fairly clean woodcut.

I have some much larger images too if you want them.

Liam

--
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by Sven Neumann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Wed, 2008-07-16 at 18:30 +0930, David Gowers wrote:

> The one thing I definitely can't do is
> * Host webpage.

I don't think we have enough space currently on gimp.org to host this.
But it doesn't really matter where it is hosted. I can put the stuff
online if you give me a tarball that I can just unpack on my web server.


Sven

PS: The images that Liam offered look very useful btw. You should
consider to use them (or some of them) for your tests.


_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by gg-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 16 Jul 2008 17:15:38 +0200, Liam R E Quin <liam@...> wrote:

> On Wed, 2008-07-16 at 22:14 +0930, David Gowers wrote:
>
>> > The one thing I definitely can't do is
>> > * Host webpage.
>
> I can do that if you want, although gimp.org would be better.
> As long as it's under a gigabyte or so.
>
> Here are some images that may help show some problems -- colour photos
> tend to hide problems, partly because the eye sees the subject more
> easily and auto-corrects flaws, and partly because the hardest thing
> for rescaling is often preserving both texture and sharpness.  Of
> course, most people are working with colour photos these days...)
>

I posted some good test images when I was working on the lanczos part of  
this code and the rotation distortions. Concentric circles and the like.  
These geometric patterns make any defect instantly visible whereas it may  
not be obvious in one operation on a photo-like image.

care should be taken not to assume the criteria is one or two simple ops  
on photos. Gimp vision specifies graphics as well as photos so defects in  
geometric shapes are highly relevant.

I also posted a woodpecker photo that had a near horizontal beak section.  
I found this was a very sensitive test for staircasing defects that may be  
relevant here.

Search bugs for lanczos or rotation to find these bug reports containing  
attachments.

regards.



> For potential problems with vertical artifacts, see the
> 1600x1200 image at
> http://www.fromoldbooks.org/Green-ShortHistory/pages/0187-Remains-of-Cloisters/
> (I had to resize it to 1024x768 using cubic and then sharpen)
>
> The 1518x916 one at
> http://www.fromoldbooks.org/YouthsInstructer/pages/072-New-Post-Office-London/
> has near-horizontal lines which are difficult.
>
> http://www.fromoldbooks.org/YouthsInstructer/pages/181-Dunluce-Castle/181-Dunluce-Castle-q59-1447x923.jpg
> has diagonals and is an RGB image instead of grayscale.
>
> http://www.fromoldbooks.org/ThomasBewick-WoodEngravings/pages/30-the-horse/1790x1307-q75.html
> is a fairly clean woodcut.
>
> I have some much larger images too if you want them.
>
> Liam
>

--

   .*.
   /V\
  (/ \)
  (   )
  ^^_^^
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by Sven Neumann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Thu, 2008-07-17 at 09:19 +0930, David Gowers wrote:

> Personally I think the test is being run under flawed conditions
> (using nonlinear sRGB rather than linear RGB, which produces errors of
> up to 50% because interpolation is done linearly despite the
> colorspace being nonlinear.). However, those are the conditions the
> user is predominantly working under.
> I'm considering doing a separate test run where I first convert to
> linear RGB and finally convert back to sRGB.

Please don't overdo it. All we need to know at this point is that the
patch is an improvement. It doesn't have to solve all problems, it just
needs to provide a somewhat better result than the old code.

Processing in linear space will happen automatically as soon as we
switch all processing to GEGL. We are not going to make the legacy code
even more complex than it already is. So please don't waste your time on
this.


Sven


_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by David Gowers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Here are some images that may help show some problems -- colour photos
> tend to hide problems, partly because the eye sees the subject more
> easily and auto-corrects flaws, and partly because the hardest thing
> for rescaling is often preserving both texture and sharpness.  Of
> course, most people are working with colour photos these days...)

Personally I think the test is being run under flawed conditions
(using nonlinear sRGB rather than linear RGB, which produces errors of
up to 50% because interpolation is done linearly despite the
colorspace being nonlinear.). However, those are the conditions the
user is predominantly working under.
I'm considering doing a separate test run where I first convert to
linear RGB and finally convert back to sRGB.

>
> For potential problems with vertical artifacts, see the
> 1600x1200 image at
> http://www.fromoldbooks.org/Green-ShortHistory/pages/0187-Remains-of-Cloisters/
> (I had to resize it to 1024x768 using cubic and then sharpen)
>
> The 1518x916 one at
> http://www.fromoldbooks.org/YouthsInstructer/pages/072-New-Post-Office-London/
> has near-horizontal lines which are difficult.
>
> http://www.fromoldbooks.org/YouthsInstructer/pages/181-Dunluce-Castle/181-Dunluce-Castle-q59-1447x923.jpg
> has diagonals and is an RGB image instead of grayscale.
>
> http://www.fromoldbooks.org/ThomasBewick-WoodEngravings/pages/30-the-horse/1790x1307-q75.html
> is a fairly clean woodcut.

All these seem good, so I've included them. I'm currently searching
for Geert's images.
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Parent Message unknown Re: need help with bug #464466 (downscaling quality)

by Guillermo Espertino :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Please consider adding typographic elements (logos, text) and
icons/diagrams to the test images.
One of the most critic use cases where downscaling shows issues is with
high contrast such as dark typography on light backgrounds.
This is particularly important when working with small designs for the
web (banners, for instance, which end up too blurry).

_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by David Gowers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Thu, Jul 17, 2008 at 7:35 AM, Sven Neumann <sven@...> wrote:

> Hi,
>
> On Thu, 2008-07-17 at 09:19 +0930, David Gowers wrote:
>
>> Personally I think the test is being run under flawed conditions
>> (using nonlinear sRGB rather than linear RGB, which produces errors of
>> up to 50% because interpolation is done linearly despite the
>> colorspace being nonlinear.). However, those are the conditions the
>> user is predominantly working under.
>> I'm considering doing a separate test run where I first convert to
>> linear RGB and finally convert back to sRGB.
>
> Please don't overdo it. All we need to know at this point is that the
> patch is an improvement. It doesn't have to solve all problems, it just
> needs to provide a somewhat better result than the old code.
>
> Processing in linear space will happen automatically as soon as we
> switch all processing to GEGL. We are not going to make the legacy code
> even more complex than it already is. So please don't waste your time on
> this.

That's unrelated. I simply meant that I currently work in linear space
anyway, and what I meant involves no code changes, just converting
between color profiles during testing to ensure more accurate
interpolation. (my point also was that it's hard to tell if it's doing
something better, when the distorted interpolation presents
significant artefacts obscuring it). Anyway -- okay, I won't do that.

David
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by David Gowers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 17, 2008 at 2:32 PM, Guillermo Espertino
<gespertino@...> wrote:
> Please consider adding typographic elements (logos, text) and
> icons/diagrams to the test images.
> One of the most critic use cases where downscaling shows issues is with
> high contrast such as dark typography on light backgrounds.
> This is particularly important when working with small designs for the
> web (banners, for instance, which end up too blurry).
I believe that most blurring problems originate from incorrect gamma
treatment .. the interpolation done during scaling and other
operations is only accurate if done in linear RGB colorspace, whereas
predominantly people use the sRGB colorspace which is nonlinear (up to
50% error can occur from interpolating sRGB values as if they were
linear.). Working in "CIE 1931 D65 Gamma 1.0" colorspace and
eventually converting to 'nativePC" profile to produce the final
picture might well improve your results. It has made my results
smoother and crisper.

(the profiles mentioned above are available from:
http://www.aim-dtp.net/aim/techniques/linear_raw/index.htm)

That said, if you provide a suitable typographical test image, I will
include it.
( I see no issue that a diagrammatic test image would show up that
wouldn't already appear on either Liam's complex engravings or a
typographical test image. So unless you demonstrate that, I will not
include a diagrammatic test image)


David
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by David Gowers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello. I've just completed the first half of the set (all specified
results before the patch). Currently image files total 66mb, I'm
guessing after adding the results after-patch this will come up to
~110mb. During this testing I found one obvious bug, it remains to be
seen whether the patch fixes it.
Anyway, FYI i'm attaching the bad result, which happens when scaling
the kingfisher test image down to 33.33% using Lanczos scaling.

I ended up eliminating most of the upscaling results, because the
amount of space used was excessive (600mb might have been the total
instead, before adding the after-patch results, had I not done this!)
Now the list of scales includes only:

50% 33.33% 12.5% 133% 3*66.66% 3*50%

I intend to try the patch tomorrow.

David


_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

33Z9.png (16K) Download Attachment

Re: need help with bug #464466 (downscaling quality)

by geert jordaens :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David Gowers wrote:

> Hello. I've just completed the first half of the set (all specified
> results before the patch). Currently image files total 66mb, I'm
> guessing after adding the results after-patch this will come up to
> ~110mb. During this testing I found one obvious bug, it remains to be
> seen whether the patch fixes it.
> Anyway, FYI i'm attaching the bad result, which happens when scaling
> the kingfisher test image down to 33.33% using Lanczos scaling.
>
> I ended up eliminating most of the upscaling results, because the
> amount of space used was excessive (600mb might have been the total
> instead, before adding the after-patch results, had I not done this!)
> Now the list of scales includes only:
>
> 50% 33.33% 12.5% 133% 3*66.66% 3*50%
>
> I intend to try the patch tomorrow.
>
> David
>  
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Gimp-developer mailing list
> Gimp-developer@...
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
>  
I may have some spare time to share this we, is there still something to
test?
I could empty my homepage and put some of the results on it f needed.

Geert
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by David Gowers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
On Sat, Jul 26, 2008 at 7:08 PM, Geert Jordaens
<geert.jordaens@...> wrote:

> David Gowers wrote:
>> Hello. I've just completed the first half of the set (all specified
>> results before the patch). Currently image files total 66mb, I'm
>> guessing after adding the results after-patch this will come up to
>> ~110mb. During this testing I found one obvious bug, it remains to be
>> seen whether the patch fixes it.
>> Anyway, FYI i'm attaching the bad result, which happens when scaling
>> the kingfisher test image down to 33.33% using Lanczos scaling.
>>
>> I ended up eliminating most of the upscaling results, because the
>> amount of space used was excessive (600mb might have been the total
>> instead, before adding the after-patch results, had I not done this!)
>> Now the list of scales includes only:
>>
>> 50% 33.33% 12.5% 133.33% 3*66.66% 3*50%
>>
>> I intend to try the patch tomorrow.
>>
>> David
>>
>>
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Gimp-developer mailing list
>> Gimp-developer@...
>> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
>>
> I may have some spare time to share this we, is there still something to
> test?

Sorry for the late reply.
All testing is completed, I just need to straighten out some oddnesses
(a few files produced were plainly the wrong dimensions)
Most notably, your code eliminates a common bug in the Lanczos
downscaling which produces a line (horizontal or vertical) of
transparency near the middle of the image. The results are generally
nicer than the old code.

> I could empty my homepage and put some of the results on it f needed.
Thank you, Sven has already offered (and it seems he has plenty of
space available), so I decided to accept his offer.

David
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Re: need help with bug #464466 (downscaling quality)

by David Gowers :: Rate this Message: