Commons:Graphics village pump/April 2021

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

How should I upload Inkscape SVGs?

I use Inkscape for creating SVG images, and I was wondering if it is better to upload an Inkscape SVG or a regular one. Both have the same file extention and are rendered the same. Inkscape SVGs can be edited in Inkscape without any problems should someone else want to edit a file. Inkscape SVGs have an extremly close file size to regular, but it is slightly higher. Which one is better? bop34talkcontribs 16:13, 11 April 2021 (UTC)

Hi @Bop34: good question – if the Inkscape one renders just as well and is not much bigger, I'd go for the Inkscape SVG. Cheers, cmɢʟee ⋅τaʟκ 21:33, 17 April 2021 (UTC)
@Bop34: It is explained at Help:Inkscape#Saving_files_in_Inkscape
The files should imho be uploaded as plain.svg, iff no features are removed.
If it is unclear it should be imho uploaded as inkscape-svg, otherwise some functions might be irrecoverable lost (e.g. arc-segments, grids, guides, layers, ... some more are listed at User:JoKalliauer/Optimization).
Some Users revert such optimizations, since the files are "not editable", while others (e.g. users that create svgs not in an SVG-editor as inkscape, but in an text-editor) prefer valid SVGs (plain-svg).
So I know users on both sides. I think some of them would like to ban the other option. I personally try solutions that full-fill to both intents, however this needs too much time/knowledge and is imho not realistic duable.
I recommend that you choose a solution that works for you, and to avoid edit-wars this decisions should imho be with the original uploader of the image, in very rar cases even two versions should be uploaded.
 — Johannes Kalliauer - Talk | Contributions 19:48, 19 April 2021 (UTC)

Artefacts at certain resolutions of scanned images

I frequently find when scanning images from books etc., that while the scan looks fine at full resolution, at lower resolutions the image appears with crosshatching or line patterns that can at times badly distort it. As an example, I downloaded a screenshot of this image. In the screenshot, at full resolution one can see a pattern of white dots superimposed over the image (which may be alternatively seen as a dark grid).

Having read the help page on scanning, I'm assuming they are some sort of moire effect? However, it's not clear to me what if anything can be done to prevent it. Can anyone help? Thanks, Gatoclass (talk) 11:45, 17 April 2021 (UTC)

Hi @Gatoclass: It's because printed material uses halftone screening comprising repeated dots of different sizes to simulate greyscale. As you pointed out, a moiré effect arises when the display resolution doesn't match the dot spacing, analogous to beats in music.
The best solution is to source higher-quality material, such as original photographs before halftoning, but that might be impossible. A workaround is to slightly blur the image using an optical low-pass filter but that degrades the image.
A better solution takes the Fourier transform of the image and discards frequencies corresponding to the pattern. Here's the procedure in The Gimp: http://en.wikibooks.org/wiki/GIMP/Remove_Coherent_Noise and a more in-depth analysis.
Hope that helps,
cmɢʟee ⋅τaʟκ 21:48, 17 April 2021 (UTC)
P.S. I used your screenshot to illustrate w:aliasing.
Thank you @Cmglee: , I'm a little busy at the moment and don't have the time to play with a new piece of software right now, but will take a look at it over the next few days and see if I can get it to work. Gatoclass (talk) 14:24, 19 April 2021 (UTC)

@Cmglee: , first of all, thank you so much for the assistance! I got the plug-in working, and have had excellent results with it so far!

One minor issue though is that the tutorial states that the "Decompose" function is found at "Image > Mode > Decompose", actually it's found at "Colors > Components > Decompose" - at least on my version, which is 2.10.14. I see there's a new version out so maybe the tutorial is correct.

Other than that, I am very pleased to have found a way to eliminate this annoying issue from my uploads! On the way, I also learned how to scale images in GIMP - which is really very simple, I don't know how I overlooked it before, so that's another important new string to my image manipulation bow! Additionally, I learned the advantages of scanning and uploading images in .png, which is another handy thing to know. So this has been a very worthwhile exchange for me. Thank you once again, your assistance is much appreciated! Gatoclass (talk) 10:07, 23 April 2021 (UTC)