MediaWiki talk:Gadget-ZoomViewer.js
This script, ZoomViewer, is a JavaScript gadget which can be enabled or disabled in your Preferences. The documentation page is located at Help:Gadget-ZoomViewer. |
i18n | Gadget translations:
internationalisation needs to be implemented |
Discussion
[edit]wgTitle
[edit]Use of wgTitle breaks the script as it contains spaces rather than underscores. Filename is hashed to generate cache file name, resulting in the wrong hash. Let me see if this can be done a bit smarter on the server side. --Dschwen (talk) 20:13, 20 March 2010 (UTC)
Does filename normalisation involve more than str_replace(' ', '_', ucfirst($filename)) ? --Dschwen (talk) 20:18, 20 March 2010 (UTC)
Display bug in IE
[edit]In my IE (32-bit, Version 8.0.6001.18975), there is no space between the end of the filename or "Full resolution" and the beginning of "ZoomViewer". — Jeff G. ツ 06:39, 25 November 2010 (UTC)
- Well, the space is in the code. I'm sorry, but I have no clue why the Internet Explorer decides to remove it. --Dschwen (talk) 15:22, 27 November 2010 (UTC)
Current status ?
[edit]What’s the current status of this script? Wasn’it enabled by default at some point? It does not now? And, did I mention how awesome it is? ;-)
Jean-Fred (talk) 23:35, 15 June 2011 (UTC)
does not work currently? +changed appearance in test code
[edit]The file_div (div with id "file") does only have one a element as child (Firefox 3.6, Linux, German Commons interface. The same for Opera 11, Linux, not signed in). Child's contents of innerHTML property: <img alt="File:Nordkirchen-Mensa-DSC 6249.jpg" src="https://accionvegana.org/accio/0IzZy9mLhlGZl1Warl2duQWYvxGc1pDc0/wikipedia/commons/thumb/e/e6/Nordkirchen-Mensa-DSC_6249.jpg/800px-Nordkirchen-Mensa-DSC_6249.jpg" height="527" width="800">
Therefore the script does not work (silently fails due to the if check in the code).
This way it works with my config: User:Saibo/MediaWiki:Gadget-ZoomViewer.js.
In addition 1: I did not insert it between the "full resolution" link and the corresponding size as both belong together. It is now:
- "Full resolution (3,264 × 2,448 pixels, file size: 3.84 MB, MIME type: image/jpeg); ZoomViewer: flash/no flash"
In addition 2: I tried to use jQuery instead of plain JS. Your opinions please / beat me. ;-) --Saibo (Δ) 16:03, 26 June 2011 (UTC)
- Nice. --Dschwen (talk) 00:02, 27 June 2011 (UTC)
- What do you think about including a check if it is a .jpg / .jpeg (no case-sensitivity) file? Currently the viewer only works with jpeg. Cheers --Saibo (Δ) 16:48, 7 July 2011 (UTC)
Problematic image
[edit]For some reason the tool does not seem to work for File:Indoor Climbing Kid.jpg, for me. Does others have the same issue with that one image? --Jarekt (talk) 17:49, 18 June 2012 (UTC)
- It works for me (somehow, just zoom in a little). But tiny images like this one are not the purpose of the zoom viewer. --Dschwen (talk) 18:50, 18 June 2012 (UTC)
- I know, but if the link is is active for images that size than it should work, or the link to the tool should not be offered. --Jarekt (talk) 19:16, 18 June 2012 (UTC)
- Yes, it should not be offered. Let's see what we can do. --Dschwen (talk) 22:29, 18 June 2012 (UTC)
Threshold has been increased
[edit]I liked very much the Zoom Viewer until I noticed that on most images that option is no longer offered. The cause for this is this edit which put the threshold to 20 megapixel (which was before at 20,000 pixel). I found the ZoomViewer quite convenient for regular shots, not just for the very huge panorama views. Could we lower this, perhaps to 2 megapixel? --AFBorchert (talk) 14:47, 29 July 2012 (UTC)
- Support. I also would like the threshold lowered. --Timeshifter (talk) 15:15, 29 July 2012 (UTC)
- Two Megapixel?! What? Most current computer screens can show about that much. Zoomviewer is using up resources on the toolserver, both in terms of storage as well as CPU to perform the processing of the images. Please keep that in mind. --Dschwen (talk) 20:33, 29 July 2012 (UTC)
- Firefox behaves badly on my platform when a JPG larger than 3 or 4 megapixels is to be displayed in full resolution. This Zoom Viewer was a perfect solution to avoid this problem. Otherwise, I have to download the full resolution pics and to view them with some other tool. This is not much fun when going through QI candidates etc. --AFBorchert (talk) 22:33, 29 July 2012 (UTC)
- Maybe then we need more choices of image sizes offered. I am not talking about the ZoomViewer. I am talking about the line of image sizes in the form of links. It seems, if I am remembering correctly, that the largest size I have seen offered is 1280 pixels wide. See for example; File:Seattle 7.jpg. The largest intermediate width offered for download for that image is 1280 pixels. Same for File:Seattle 4.jpg.
- I would like some larger widths offered. Maybe up to 2000 pixels wide. I don't mind scrolling a little in my 17-inch monitor. But I don't want to download these larger images that I have to resize myself in order to get a better view. The zoom viewer in IrfanView, the freeware image editor/viewer that I use is slow when playing with that larger 23 MB image, File:Seattle 7.jpg. It is jerky when scrolling horizontally or vertically in zoom mode. When not in zoom mode the image is so huge that it is hard to put anything in perspective overall. Even with the 4 MB image, File:Seattle 4.jpg, zooming in IrfanView is slow, jerky, and unsatisfying.
- Are there other free image viewers with faster zoom viewing? --Timeshifter (talk) 19:11, 30 July 2012 (UTC)
Done Ah well, who am I to deny you that change. If people want it enabled for smaller images they should have it. Cheers. --Dschwen (talk) 20:47, 30 July 2012 (UTC)
- Thank you, Dschwen! I am really relieved to have this great tool back for medium-sized pictures. Regards, AFBorchert (talk) 07:11, 31 July 2012 (UTC)
- Thanks. This is such a cool tool. The Google Maps of the Commons. --Timeshifter (talk) 15:01, 31 July 2012 (UTC)
- Come on, this is the Google Maps of the Commons! ;-) --Dschwen (talk) 18:31, 31 July 2012 (UTC)
- I don't understand that image. When I click an embedded image nothing happens. I must be missing something. --Timeshifter (talk) 18:15, 1 August 2012 (UTC)
- Huh? This is just a screenshot. The map can be accessed on image pages with coordinates (or here as a demo). --Dschwen (talk) 19:00, 1 August 2012 (UTC)
- I don't understand that image. When I click an embedded image nothing happens. I must be missing something. --Timeshifter (talk) 18:15, 1 August 2012 (UTC)
- Come on, this is the Google Maps of the Commons! ;-) --Dschwen (talk) 18:31, 31 July 2012 (UTC)
Display sideways
[edit]In some files where I rotated the camera by 90 degrees, due to the vertical extent of the subject, see for instance File:Aloe excelsa, Jan Celliers Park.jpg, the flash viewer still shows the subject sideways though the picture in commons is upright. How can this be rectified? JMK (talk) 16:11, 25 August 2012 (UTC)
- By tilting your head to one side. Uhm, no seriously that issue did never come up when I designed the zoomviewer as the threshold for zoomviewer usage was not meant to be so low that single frames straight out of the camera triggered it. All my examples were stitched files which pretty much never have their rotation determined by EXIF data. This may be a bit tricky to fix. One solution would be to rotate the files on your computer (in linux simply use the exifautotran command which takes care of this automatically without lowering the image quality by recompression). --Dschwen (talk) 22:05, 10 September 2012 (UTC)
- Freeware IrfanView does lossless rotation of images. --Timeshifter (talk) 18:18, 12 September 2012 (UTC)
TIFF?
[edit]ZoomViewer is disabled for TIFFs ; but my understanding is that IIP does support TIFF. Am I missing something? What needs to be done to get this working for TIFFs?
Jean-Fred (talk) 11:50, 16 April 2014 (UTC)
- It is not really a question of IIP supporting it, but of VIPS (the scaling and tiling backend) supporting it (and it does). The zoomviewer is probably going to be my next project, not that the WikiMiniAtlas has been moved over to Labs. --Dschwen (talk) 14:55, 16 April 2014 (UTC)
How can one force ZoomViewer to reprocess an image?
[edit]This is sometimes needed after a major image edit. WolfmanSF (talk) 04:37, 8 January 2015 (UTC)
- This I can fix more easily. I've meant to do it for a long time. I'll have to compare file date to cache tile date and invalidate accordingly. I have already implemented that logic in the pano viewer. About time I add it to the zoomviewer. --Dschwen (talk) 15:03, 8 January 2015 (UTC)
Why does ZoomViewer sometimes change the colors of an image?
[edit]For example, it does here (colors lose intensity), but not here. WolfmanSF (talk) 04:42, 8 January 2015 (UTC)
- Hmmm, I'm sure it has something to do with color profiles (being applied or not). I'll see if I can do anything about it. --Dschwen (talk) 14:55, 8 January 2015 (UTC)
- Yeah, the second image uses the sRGB color profile and gets displayed correctly in both views. The first one has an "uncalibrated" profile. Apparently both the mediawiki thumbnailer as well as the browser still display the image a sRGB, but for some reason the conversion process for the zoomviewer does not. Hmm, I don't know if I can fix this easily. I guess for now the files will have to have a valid color profile specified for the color to come out predictably. --Dschwen (talk) 15:00, 8 January 2015 (UTC)
- Thanks for the explanation. WolfmanSF (talk) 05:12, 9 January 2015 (UTC)
- Yeah, the second image uses the sRGB color profile and gets displayed correctly in both views. The first one has an "uncalibrated" profile. Apparently both the mediawiki thumbnailer as well as the browser still display the image a sRGB, but for some reason the conversion process for the zoomviewer does not. Hmm, I don't know if I can fix this easily. I guess for now the files will have to have a valid color profile specified for the color to come out predictably. --Dschwen (talk) 15:00, 8 January 2015 (UTC)
ZoomViewer not working right now
[edit]@Dschwen: The ZoomViewer (flash) shows a black screen. The JS version says "No response from server iipsrv.fcgi". --Alexrk2 (talk) 14:59, 13 October 2015 (UTC)
- @Dschwen: Hello there. Sadly it's still not working, at least since some days. It would be nice if this could be fixed. Thanks a lot! Best regards, --#Reaper (talk) 17:03, 7 November 2015 (UTC)
Error 404 on https://tools.wmflabs.org/zoomviewer/index.php
[edit]The call to the ZoomViewer page gives an error 404 ...
The URI you have requested, /zoomviewer/index.php, doesn't seem to actually exist.
@Dschwen: could you please have a look at? --Alexrk2 (talk) 12:50, 5 January 2016 (UTC)
- Webservice restarted. Works now! --Dschwen (talk) 01:18, 6 January 2016 (UTC)
ZoomViewer does not work if there is an apostrophe in the file name
[edit]The ZoomViewer gadget does not work if there is an apostrophe (') in the file name.
Example of a file name with an apostrophe (in French):
- File: Anniversaire de la mort d'Adolphe Thiers.jpg
- ZoomViewer: Anniversaire de la mort d'Adolphe Thiers.jpg ==> NOK
How can this be solved?
--Dodeeric (talk) 11:51, 13 November 2019 (UTC)
- A possible workaround is to change the English apostrophe (') to the French apostrophe (’) in the file name. --Dodeeric (talk) 10:11, 18 November 2019 (UTC)
Removing Flash
[edit]Adobe Flash support will be terminated in 2020. Then should we remove the "flash" link? – Kwj2772 (talk) 18:24, 23 November 2019 (UTC)
- Since Flash reached end of life at the end of 2020, it might improve the user experience somewhat to remove flash as a standard option on every commons page. (Perhaps keeping it as a preference option for those who need it for some reason?) --Mbrickn (talk) 11:45, 19 January 2021 (UTC)
- Right now I seem to be getting an error
No response from server iipsrv.fcgi
with or without Flash… is the ZoomViewer still working for others? --Lucas Werkmeister (talk) 21:33, 19 January 2021 (UTC)- Done Well, the tool still isn’t working for me at all, but I’ve at least removed the Flash link for now. --Lucas Werkmeister (talk) 22:02, 17 February 2021 (UTC)
add TIFF, also ".tif" (2023)
[edit]{{Edit request}} (stalled, see below)
There was discussion about this in 2014 (#TIFF?).
{{InteractiveViewer}} works on files such as the ones in Category:ETH-BIB_Friedli-Luftbilder, but it would easier if a "ZoomViewer" link was there by default.
To do so, the regex at name.match(/File:(.+\.jpe?g)/i) would need to be changed. Maybe name.match(/File:(.+\.(jpe?g|tif?f)/i) does it. Enhancing999 (talk) 13:50, 3 February 2023 (UTC)
- I suggest
/File:(.+\.(?:jpe?g|tiff?))/i
for the regex; however, the ZoomViewer is currently broken (No response from server /fcgi-bin/iipsrv.fcgi
), so I can’t verify that it actually supports TIFF images. @Dschwen and Tacsipacsi: Looking at the tool directory on Toolforge, it seems to be listening oniipsrv-fastcgi.socket-0
rather thaniipsrv-fastcgi.socket
for some reason? Lucas Werkmeister (talk) 11:00, 1 October 2023 (UTC)
- Still broken I’m afraid :( (tested at Glacier Panorama.jpeg) – I’m disabling the edit request for now to get it out of the maintenance category; Enhancing999, if you’re a regular ZoomViewer user, please reenable the edit request when it works again. (I think the edit request is valid in principle, but I’d like to be able to test it before doing it.) --Lucas Werkmeister (talk) 23:05, 3 November 2023 (UTC)
ZoomViewer isn't working
[edit]Hello. I'm not sure if this is the place to report it, but ZoomViewer gadget isn't working at all (at least, on Firefox browser). "503 Service Unavailable" message is shown when trying to use it (for example, here). MGeog2022 (talk) 12:49, 6 July 2023 (UTC)
- @MGeog2022: Nothing we can do about that here IMHO. Disabling edit request. --Lucas Werkmeister (talk) 20:07, 30 September 2023 (UTC)