Commons:Graphics village pump/April 2012
help with svg: much too large compared to png
I know svg files are preferred, and s.o. created an svg version of this 64kB png file here, but the result is 1.4MB. Is there a way to reduce that, or is it not important? Kwamikagami (talk) 22:37, 7 April 2012 (UTC)
- Well, the base map used, File:BlankMap-World6.svg, is 1.53 MB, so your colorized version of it is not likely to be dramatically smaller... AnonMoos (talk) 09:43, 8 April 2012 (UTC)
- The least complicated way is to try to find a different base map (which has already been simplified/optimized), and colorize that. I sometimes import selected vector outlines into the Fontforge tool to simplify them, but that particular method would not be too practically useful for something like BlankMap-World6.svg... AnonMoos (talk) 02:42, 12 April 2012 (UTC)
Help with worldmap tool
I'm trying to fix File:BlankMap-World-162E.svg.
The borders of South Sudan were added by drawing a white line, rather than creating two new objects for Sudan and South Sudan. While I could approximate a fix manually by creating a new object for South Sudan and crudely matching the southern borders for Sudan, I want to do it properly. This means we need to regenerate a map with the script used to create it originally (Worldmap tool), based on the current up-to-date map.
I've installed Python and installed the scripts with no problem, and am now being once again reminded of how embarrassingly underqualified I feel use a computer. (The only programming that I do is fairly basic php stuff done in a test editor and tested XAMPP, and the only times I use the command line have been when I copy/paste exact syntax.)
I clicked on the nugsl-worldmap script, and provides pretty explicit instructions for using it ("i [filename]"; "m 162E"; "o [new filename]"). And yet I can't figure out how to actually run it. Not only don't I know the intermediate step involved in getting to the point of using the scripts, I don't know how to google it.
- This is a Python scripting problem rather than a direct image-fixing problem, so you're more likely to get answers on a forum devoted specifically to Python... AnonMoos (talk) 06:08, 21 April 2012 (UTC)
Advice with de-watermarking
Hi. I'm not sure whether this is the right place to ask, but I wonder if anybody could give me some advice on watermark removal.
By estimating the watermark and then inverting it I've had some success removing the watermarks themselves, but I'm left with a roughly fleur-de-lys shaped area that's discoloured, where the watermark previously was.
The files in question are about 70 scans of early 19th century colour aquatint engravings, which can be found in Category:Pyne's Royal Residences -- essentially all the files in that category which have pale-coloured borders that haven't been cropped.
Examples of the discolouration can be seen e.g. on this building (link) to the right-hand side of the central section; or on this building (link), to the right of the shadow cast by the tree. As well as making light areas darker, the discolouration also makes areas of strong red or green lighter -- for example in this picture (link), the right of the fireplace is darkened, but the green wall next to it gets a pale stain; similarly in this one (link), the red wall is marked, next to the doorway; here (link) the red curtain is discoloured, around the doorway; and here (link) you can just see its effect on the brown of the books in the bookshelves. All the files are affected, but the problem can be less or more obvious, depending on the local content of the image.
The website I got the images from had a lower (50%) resolution file for each image, plus a higher-resolution image marked with a semi-transparent watermark. I imagine that the watermark was applied by adding a layer to the image, mostly transparent apart from the greyscale watermark itself, added with about 10% opacity. I've been able to get a reasonable estimate of the watermark itself, and remove it, by using Gimp's "grain extract" on the watermarked image against a scaled-up version of the unwatermarked low-res image; averaging the results obtained over a dozen or so images; inverting the result; and then adding the inverted result back to each watermarked image using Gimp's "grain merge".
I'm thinking that if the watermarked area ≈ 90% * original image + 10% * watermark, this has disposed of the 10% quite well -- but I'm still left with an area where the watermark had been, that is only 90% of the intensity of the original which is why it appears discoloured.
It seems to me it ought to be possible, therefore, to boost up the discoloured area to 110% (okay, for pedants, 111%), using a suitable mask, and thereby fix the image. But (and I may be missing something obvious), I'm not understanding why some areas are darkened and other areas are lightened -- so I can't quite see just how the affected area should be boosted up.
I do have a work-around. In this picture, where the stain became particularly obvious where it stuck up into the sky, I patched the affected area with a patch made from the low-res image combined with the highest-detail level from Gimp's wavelet decomposition of the de-watermarked image. It's not bad, but it's a bit soft, and there's some haloing visible around dark edges -- eg above the battlements, and to the right of the statue. I could probably do better, by comparing the de-watermarked image against an actual 50% downscaled version of itself to get the grain to extract, rather than just clicking on the wavelet decomposition filter. That might produce somewhat better results (though I might have to use another program because Gimp's 50% downscaling isn't very good). But I do feel there ought to be a simpler way, if I just knew the appropriate way to boost the affected area.
Presumably, this must be a fairly standard thing to have to deal with, when trying to clean out semi-transparent watermarks. So can anybody advise what the right way is to treat discoloured areas left behind once the watermark itself has been removed? Jheald (talk) 16:37, 25 April 2012 (UTC)