Template talk:Convert to PNG
Template:Convert to PNG
[edit]The reason to use, or not use, the template {{Convert to PNG}} is being discussed at Commons:Village pump#Policy PNG vs. GIF which is also cross-linked to the related English Wikipedia en:Template talk:ShouldBePNG#PNG vs. GIF. -84user (talk) 16:59, 22 September 2010 (UTC)
- There are many reasons not to convert GIF images to PNG images. Those who are interested can read more here:
- en:Template talk:BadGIF and Template talk:BadGIF --Timeshifter (talk) 09:03, 24 September 2010 (UTC)
Parameter for JPG files that can automatically converted into PNG
[edit]There are many diagrams or drawings in the JPG format that do not show compression artifacts in full resolution, but do show them in reduced resolution (preview on file description pages or thumbnails in articles). These images would benefit from being converted into the PNG format. Examples: 1, 2, 3, 4. I suggest adding a parameter to the template that would allow tagging such images (but not JPG images with compression artifacts even in full resolution). The conversion of tagged images could then even be performed by a bot. --Leyo 20:06, 8 December 2010 (UTC)
- Just to clarifiy and provide background info: This nearly will apply to all images which have sharp contrasts like 1 as jpg is not designed to be used for such types of images. For background you can see this German discussion in Forum (perm.link.) or (less relevant) this Village Pump discussion which is concerning the root problem (in addition to people choosing wrongly jpg instead of png for such files): too high jpg compression. Cheers --Saibo (Δ) 21:45, 8 December 2010 (UTC)
I really don't understand how you can "automatically" convert a JPEG into a clean PNG unless you do some form of what Photoshop calls "posterizing" -- however, even this would often require judicious human input into the cut-off values to obtain good results... AnonMoos (talk) 16:06, 27 December 2010 (UTC)
- I converted several JPG images to the PNG format using MS Office Picture Manager. The thumbs of the converted files did not show any compression artifacts whereas the JPG thumbs did. Manuel converting might be superiour in some cases, but even bot conversion could result in markedly better thumbs (shown in articles). --Leyo 16:15, 27 December 2010 (UTC)
- AnonMoos, you have missed this: "do not show compression artifacts in full resolution". That's important for this process. Cheers --Saibo (Δ) 16:31, 27 December 2010 (UTC)
- If the pixel image data in a JPEG has internal sharp edges, then by the basic properties of the mathematical algorithms which are used in JPEG compression and decompression, the JPEG file necessarily always shows compression artifacts -- unless all the sharp edges are on the borders of 8-pixel and/or 16-pixel blocks... AnonMoos (talk) 17:09, 27 December 2010 (UTC)
- Sure - if you like to take it in the exact sense then change "do not show compression artifacts in full resolution" to "do not show visible compression artifacts in full resolution" in above discussion... You have not yet understood the problem here. Cheers --Saibo (Δ) 18:24, 27 December 2010 (UTC)
- I see plenty of JPEG artifacts in de:Datei:2009-11_Dienststellenkarte_PPT_grün_mit_Legende.jpg without any magnification -- and if you magnified that image by 400% or 500% then they would be obvious in many places in the image. What I really don't understand is how that image could be "automatically" be converted into a good-quality PNG. AnonMoos (talk) 22:09, 27 December 2010 (UTC)
- Are you talking about the full resolution or the version shown in the file description page? The full resolution would not benefit from the conversion, but any thumbnails would. --Leyo 22:36, 27 December 2010 (UTC)
- I see plenty of JPEG artifacts in de:Datei:2009-11_Dienststellenkarte_PPT_grün_mit_Legende.jpg without any magnification -- and if you magnified that image by 400% or 500% then they would be obvious in many places in the image. What I really don't understand is how that image could be "automatically" be converted into a good-quality PNG. AnonMoos (talk) 22:09, 27 December 2010 (UTC)
2013
[edit]I would like to resume the discussion. IMO the JPG to be converted to have to fulfill several criteria such as being non-photographic (obviously) and no clearly visible compression artefacts at full resolution. I suggest the following:
- A parameter, e.g. bot or auto will put the files in question to a subcategory, e.g. Category:Images to be converted to PNG by bot.
- The bot checks automatically if the template (parameter) has been added by a trusted user and if the resolution meets COM:MAXTHUMB.
- If yes, it converts the JPG into the PNG format, optimizes and uploads the file.
- The original JPG file is tagged with {{Duplicate|converted to PNG by bot}} (or a separate template). Like this, the file is put into a subcategory of Category:Duplicate.
- The files in this category are carefully reviewed. If the PNG (incl. thumbs) is of superior quality compared with the JPG, the CommonsDelinker is advised.
- The original JPG may get deleted and replaced by a redirect if appropriate.
User:Slick would be willing to operate a bot with the above described features. --Leyo 23:47, 19 February 2013 (UTC)
- #2 (if the template (parameter) has been added by a trusted user) is a new feature, I am not sure I can realize this part. I will need technical support here or can not realize (only) this part yet. --Slick (talk) 07:58, 20 February 2013 (UTC)
- I do not think this is mandatory. Converted files do get reviewed anyway by trusted users (administrators) (see #5). --McZusatz (talk) 11:22, 20 February 2013 (UTC)
- Rotatebot analyzes this (see its log). But I agree that this step might also be left out. --Leyo 12:16, 20 February 2013 (UTC)
- I do not think this is mandatory. Converted files do get reviewed anyway by trusted users (administrators) (see #5). --McZusatz (talk) 11:22, 20 February 2013 (UTC)
- Support It will help to reduce newly created artefacts after editig files. --McZusatz (talk) 22:18, 20 February 2013 (UTC)
- Oppose You can not use a bot to convert an image from a lossy format to a lossless format. This does not add anything. In almost all cases the resulting PNG is bigger than the JPG because of the JPG compression artifacts. All this does is wasting time and space. In almost all cases you need to redraw the image. At least you need to put some work into the image using some filters and stuff. This can not be done with a script.
I know there is a problem with ugly looking thumbnails in some cases. This must be fixed in the code that creates the thumbnail. From what I understand the thumbnail simply uses the same compression ration as the original JPG. If this is true the solution is simple: Change the thumbnail creation to use a compression ratio not lower than a given threshold. --TMg 10:49, 21 February 2013 (UTC)
- File size does not matter in this case and only images which do not need to be redrawn are tagged. The bot will only convert the file 1:1 and possibly put them into Category:Images in lossless format with lossy compression artifacts. Therefore the human reviewer only needs to download the png and apply some simple filer (posterisation, contrast, ...). After that the file size will likely be smaller and the workload was also reduced. (Right now you need to download the jpg file, convert it and apply the filer, reupload it while copying the description, replace all usages, tag the old file with appropriate templates, etc.)
- Also keep in mind it is unlikely that the jpeg thumbnail generator gets changed. It's primary target are jpeg-photographs and not diagrams and stuff. Also the thumbnail generator does not take into account the compression ratio of the original file. --McZusatz (talk) 11:42, 21 February 2013 (UTC)
- +1. Another thumb comparison: JPG vs. PNG. --Leyo 13:12, 21 February 2013 (UTC)
- Sorry, but this comparison is funny. The JPG thumbnail was much better. The PNG thumbnail is blurry. --TMg 13:02, 1 March 2013 (UTC)
- Someone with a good monitor and a good sight will definitely see the ugly JPG compression artifacts. They are much worse than the little blur. --Leyo 13:13, 1 March 2013 (UTC)
- Sorry, but I find the blur much worse than the almost invisible artifacts. --TMg 11:14, 2 March 2013 (UTC)
- Likely there are files whose improvement can be seen differently but at least some show a real advantage clearly visible on all screens. Take this logo for example: The file history has a JPG and a PNG version. --McZusatz (talk) 15:27, 4 May 2013 (UTC)
- Sorry, but I find the blur much worse than the almost invisible artifacts. --TMg 11:14, 2 March 2013 (UTC)
- Someone with a good monitor and a good sight will definitely see the ugly JPG compression artifacts. They are much worse than the little blur. --Leyo 13:13, 1 March 2013 (UTC)
- Sorry, but this comparison is funny. The JPG thumbnail was much better. The PNG thumbnail is blurry. --TMg 13:02, 1 March 2013 (UTC)
- +1. Another thumb comparison: JPG vs. PNG. --Leyo 13:12, 21 February 2013 (UTC)
Doubt
[edit](From the documentation) «PNG does not support animation»: it's not actually true (although MNG and APNG are still unofficial extensions); see Category:Animated PNG for examples. I think we should explain this more clearly in the documentation. --Ricordisamoa (talk but not stalk) 01:12, 5 January 2013 (UTC)
GIF and JPEG
[edit]Why to focus attention on these two formats? {{Convert to PNG}} is applicable to TIFF and PDF as well. Let’s just say the image should be PNG if in any raster format at all. Incnis Mrsi (talk) 19:05, 3 August 2019 (UTC)
- It is not necessary at all to convert something into PNG, only if the file has gradients in transparencies. For all other cases, PNG is superfluous. Converting TIF or PDF to PNG would be vandalism. --Ralf Roletschek 06:07, 8 August 2019 (UTC)
- Vandalism? Risible. Incnis Mrsi (talk) 15:20, 11 August 2019 (UTC)
WEBM to PNG?
[edit]There are number of media files which end as .webm
but actually are images. Some examples
File:Sub-buzz-2382-1467347994-2.webp File:Alat-kontrasepsi-IUD.webp File:990073 2fe2c8419f1a40108bac042271e65bc9 mv2 (1).webp
Should we use the template {{Convert to PNG}} here as well?--Estopedist1 (talk) 16:46, 14 November 2019 (UTC)