Commons:Graphics village pump/July 2013

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Award-star-gold-3d.svg does not render correctly to PNG below about 100px[edit]

File:Award-star-gold-3d.svg changes appearance dramatically when rendered to PNG below about 100px, and doesn't render at all below 15px. See en:Wikipedia:Village pump (technical)#File does not render below 15px. —[AlanM1(talk)]— 10:51, 8 July 2013 (UTC)[reply]

I did some general code cleanup (not fixing as such); not sure much can be done on the SVG code side without bugfixes to the "Rsvg" software.... AnonMoos (talk) 01:57, 9 July 2013 (UTC)[reply]
Yeah, there was some explanation at en:Wikipedia:Village pump (technical)#File does not render below 15px. Oh well. My particular problem is solved by the use of the other SVG that appears to contain an embedded binary image of some sort, and renders correctly at all relevant sizes. I just document that this image should not be used until the bug is resolved. —[AlanM1(talk)]— 16:37, 9 July 2013 (UTC)[reply]

Pulling illustrations from scanned book pages[edit]

Category:Svenskt Porträttgalleri contains some portraits found in a scanned book. Here is a typical page from that book, actually a series of 16 volumes containing a total of 20,000 portraits, available in good 300 dpi scans (follow the "full resolution" link). How can we extract all the portaits without manually cropping each image? Is there some software that can find and extract all oval shaped illustrations from each page? --LA2 (talk) 21:22, 13 July 2013 (UTC)[reply]

ScanTailor identifies the ovals and produces a mask. Maybe that can be used as a first step. Edaen (talk) 23:03, 13 July 2013 (UTC)[reply]
I should add that I have run ABBYY Finereader OCR on these pages, to retrieve the text. However, it doesn't do a good job in finding the portraits. Sometimes it does, but often it groups all portaits in a page together as one single illustration, or fails to recognize any illustration at all.
A friend mentioned the OpenCV free software library for computer vision, and I have asked the same question on their Q&A forum. --LA2 (talk) 23:31, 13 July 2013 (UTC)[reply]

Truncated quadratic Bezier in rendered SVG[edit]

Note curve from Mar 15: 21.8 km doesn't almost touch its circle

In the SVG (rendered as PNG) on the right, the quadratic Bezier curve from Mar 15: 21.8 km is truncated. It's not an aliasing issue as it still appears so in larger renders. The native SVG renders correctly in Firefox and Chromium.

Can anyone help, please? Thanks, cmglee (talk) 18:14, 17 July 2013 (UTC)[reply]

Fixed by breaking the compound path apart.—Love, Kelvinsong talk 19:04, 17 July 2013 (UTC)[reply]
Thanks, Kelvinsong. It's still a librsvg bug someone should look at... cmglee (talk) 11:12, 19 July 2013 (UTC)[reply]

Click to play (Animated GIFs)[edit]

Is it possible to set gifs to click to play. Having them endlessly cycle makes reading text difficult. James Heilman, MD (talk) 07:40, 18 July 2013 (UTC)[reply]

The basic GIF parameters only allow for either a fixed number of repeats, or an indefinite number of repeats... AnonMoos (talk) 22:49, 19 July 2013 (UTC)[reply]
Okay and how does one set the number of repeats? James Heilman, MD (talk) 05:43, 20 July 2013 (UTC)[reply]
That depends on your authoring software - in GIMP these settings are in the dialog for exporting to GIF. darkweasel94 09:51, 20 July 2013 (UTC)[reply]
For Firefox there is an addon that turns off animated gifs on a page. Reload the page to restart the gif animation. At least that is how I restart the animation.
https://addons.mozilla.org/en-us/firefox/addon/toggle-animated-gifs --Timeshifter (talk) 23:55, 20 July 2013 (UTC)[reply]
Okay so nothing in MediaWiki that can set this parameter? James Heilman, MD (talk) 16:52, 23 July 2013 (UTC)[reply]

SVG image not updating[edit]

I uploaded an updated version of this image to Commons yesterday, yet the SVG shown is not the latest version (the latest includes RI at the end). The PNG renderings and file history all reflect the latest version, however. The correct version appears inline in National Popular Vote Interstate Compact, but the outdated version is shown when hovering or clicking on it. Am I doing something wrong, or is this a Commons bug? Swpb (talk) 15:29, 20 July 2013 (UTC)[reply]

It works for me, try clearing your cache. darkweasel94 17:08, 20 July 2013 (UTC)[reply]
That did it - but isn't it a problem that one has to refresh one's cache to see the latest version of the file? Swpb (talk) 17:42, 20 July 2013 (UTC)[reply]
No, that is the purpose of the cache after all!
I don't know if there are some HTML tricks to instruct the client to invalidate the cache and reload an image, but I assume there are not (otherwise this would be done already I assume). --Patrick87 (talk) 17:56, 20 July 2013 (UTC)[reply]
I don't know exactly either, but I do remember that when I once had a MediaWiki and a Simple Machines Forum installation on the same web server and changed a CSS file they shared, the MediaWiki installation required clearing the cache but the SMF installation didn't. darkweasel94 18:21, 20 July 2013 (UTC)[reply]
Just did a quick Google search and there really doesn't seem to be an easy possibility to invalidate client caches (except e.g. adding a version number to the filename downloaded from the server which would need substantial coding effort to implement in MediaWiki I assume.)
What you observed darkweasel94 was probably different settings how to create caches between the platforms. You actually can advise a client after how many days it should reload the content. But you can't change this "deadline" after afile was cached. --Patrick87 (talk) 18:29, 20 July 2013 (UTC)[reply]
Ok, thanks for the information. darkweasel94 18:32, 20 July 2013 (UTC)[reply]