Hi Brian,

Thanks for taking this on.

I've put some comments up in response to your post at
https://commons.wikimedia.org/wiki/Commons:Village_pump#Experimenting_with_using_VIPS_to_render_large_tiff_files

The short version is that many of these big files are maps or engravings, and really need an anti-aliassing filter (eg a Lanczos filter) when they are reduced, otherwise we get nasty "jaggies" and other aliassing artefacts.

Unfortunately, it seems that VIPS does not do any anti-aliassing (and nor does the Image Magick 'thumbnail' option we currently use).

It's a shame when we have very good high-resolution originals, to be presenting downsized versions which look so poor.

For comparison, I have put up copies of a couple of the images rescaled to 1280px using Image Magick's "resize" command, to show what potentially can be achievable at this resolution, if we allow a few more clock cycles.

All best,

   James.



On 02/10/2014 22:57, Brian Wolff wrote:
Hi everyone.

tl;dr: Can we do https://gerrit.wikimedia.org/r/164476

Now that the pre-requisite patches for using VIPS with tiff has been
merged (Woo!), lets umm use it.

So for those who don't know what vips is, vips is an alternative to
image magick which can scale certain file formats in essentially
constant memory (Or probably to be pedantic, linear in the number of
pixels in the resulting file, instead of linear in the number of
pixels in the source). This means we would be able to make thumbnails
no matter how big the source file is. Which is good because we have
lots of very high resolution tiff files, such as [[File:Zoomit2.tif]]
and [[File:Zentralbibliothek Zürich - Mittelalterliche Stadt -
000005203.tif]]. We already use VIPS to scale png files larger than 20
megapixels, and non-progressive jpeg files can be scaled efficiently
with image magick, so tiff is the current pain point in terms of
scaling limits (although GIF is also painful).

I would like to propose the following:

First we experiment with turning it on for files > 50 megapixels.
Currently we do not even try to render such files, so I doubt this
will cause any community angst. To that end I proposed a patch (
https://gerrit.wikimedia.org/r/164476 ) that uses the following
settings:

                array(
                        'conditions' => array(
                                'mimeType' => 'image/tiff',
                                'minShrinkFactor' => 1.2,
                                'minArea' => 5e7,
                        ),
                        'sharpen' => array( 'sigma' => 0.8 ),
                )

This will turn the feature on for big files (which currently do not
render), and also enable sharpening (Most tiff images benefit from it
and the community has asked for it repeatedly, I think its less
disruptive to enable sharpening at the same time as VIPS, instead of
two separate changes to tiff rendering).

I would propose we let that sit for a little bit. We should than have
a community discussion (With the commons community, since its hard to
have a discussion with every community, and commons (+esp. Glams) are
the people who care the most about this) to see if the community likes
that. Hopefully if all is well we could move to stage 2, which would
be something like:

                array(
                        'conditions' => array(
                                'mimeType' => 'image/tiff',
                                'minShrinkFactor' => 1.2,
                        ),
                        'sharpen' => array( 'sigma' => 0.8 ),
                ),
                array(
                        'conditions' => array(
                                'mimeType' => 'image/tiff',
                        ),
                ),


Anyways, thoughts. Does this sound like a good plan? Someone want to
be bold and deploy my change ;)

--bawolff

_______________________________________________
Multimedia mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/multimedia



_______________________________________________
Multimedia mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/multimedia

Reply via email to