Hello,
Commons received this offer on its Village pump recently:
<quote> == PNG images not thumbnaling to JPG == As discussed [[Commons:File_types#Images|here]], "thumbnails are generated in the same format as the original image and are always in 24-bit color ...".
Obviously the reason this issue still exists is because some images should by all means be thumbnailed to PNG (line art, comics, maps, etc), and would suffer from JPEGification. However, as also pointed out on that page, this discourages people from uploading PNGs, which are particularly favourable for long-term archival purposes.
I have some background in digital imaging and watermarking, and could probably throw together a set of scripts and programs in a month's spare time to algorithmically analyse candidate images and determine how they should be thumbnailed. The issue of properly handling greyscale images would also be handled.
But of course, I don't want to start on this, only to find out later that it's rejected for some reason <tt>:-)</tt>.
Is this something the Wikimedia community would find useful? </quote>
What is necessary for his work to be useful, and used, in MediaWiki?
thanks, Brianna user:pfctdayelise
Brianna Laugher wrote:
<quote> == PNG images not thumbnaling to JPG == As discussed [[Commons:File_types#Images|here]], "thumbnails are generated in the same format as the original image and are always in 24-bit color ...".
Obviously the reason this issue still exists is because some images should by all means be thumbnailed to PNG (line art, comics, maps, etc), and would suffer from JPEGification. However, as also pointed out on that page, this discourages people from uploading PNGs, which are particularly favourable for long-term archival purposes.
I have some background in digital imaging and watermarking, and could probably throw together a set of scripts and programs in a month's spare time to algorithmically analyse candidate images and determine how they should be thumbnailed. The issue of properly handling greyscale images would also be handled.
But of course, I don't want to start on this, only to find out later that it's rejected for some reason <tt>:-)</tt>.
Is this something the Wikimedia community would find useful?
</quote>
What is necessary for his work to be useful, and used, in MediaWiki?
While that might be a really nifty feature, I can't help but think that allowing users to specify the thumbnail format manually would be both easier to implement and more useful in practice.
The syntax should actually be pretty straightforward -- just add a few more magic words (we only really need "jpeg" and "png" for now) to the image tag parser -- and ImageMagick can already convert from one format to another just fine. The hardest part would be restructuring the thumbnail repository to allow thumbs in multiple formats to coexist.
Of course, that and any autodetection code could presumably work together, should we actually get around to developing both.
Ilmari Karonen wrote:
The hardest part would be restructuring the thumbnail repository to allow thumbs in multiple formats to coexist.
The thumbnail repository is made of folders, and thumbs keep their format extension, so Having 800px-Example.jpg and 800px-Example.png wouldn't be a problem. However, i think there was also a SQL table indexing them, which may need some little changes. Also the auto-thumbnailing script (should be easy).
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Platonides wrote:
Ilmari Karonen wrote:
The hardest part would be restructuring the thumbnail repository to allow thumbs in multiple formats to coexist.
The thumbnail repository is made of folders, and thumbs keep their format extension, so Having 800px-Example.jpg and 800px-Example.png wouldn't be a problem.
Note that we already have alt-format thumbs, for rendering of SVG vector images and DjVu pages to PNG and JPEG.
So something like this should not be a problem:
thumb/7/70/Example.png/800px-Example.png.jpg
However, i think there was also a SQL table indexing them, which may need some little changes.
Currently there's no SQL table of thumbnails; the whole subdirectory is simply wiped out (and its contents purged from squid cache) when the source image changes.
Also the auto-thumbnailing script (should be easy).
*nod*
- -- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org