Template talk:Css image crop

From Wikisource
Jump to navigation Jump to search

Failing Test cases[edit]

Check Template:Css image crop/testcases.--Arjunaraoc (talk) 04:06, 18 April 2014 (UTC)[reply]

  • Folks, I removed this logic:
{{#ifeq:{{{Rotate|0}}}|0||filter: progid:DXImageTransform.Microsoft.BasicImage(rotation={{#ifeq:{{{Rotate}}}|90|1|{{#ifeq:{{{Rotate}}}|180|2|{{#ifeq:{{{Rotate}}}|-90|3|{{{Rotate|???}}}}}}}}});}}
  • from the template, both because I don't understand it (weak excuse) and because when it is present wikimedia inserts style="/* insecure input */" (strong excuse!)
    (Much) more tweaking and preferably subtle surgery with an axe required on this template. Sadly I have (temporarily) run out of time and will have to set this aside for the rest of the day! AuFCL (talk) 23:32, 18 April 2014 (UTC)[reply]
    More work needed to chop out deadwood in this template (lots of potential there!) Task for another day. This is not going to end up looking anything like the original, I hope everybody realises…
    Still hoping somebody can please explain that DXImageTransform.Microsoft stuff, and whether it is still useful, because until they do I see no point in putting it back. @George Orwell III:: might this be required by (some? or any? version) of Internet Explorer, do you think? AuFCL (talk) 08:51, 19 April 2014 (UTC)[reply]

New IMG attributes[edit]

AuFCL, et al.

Fwiw... just noticed the "srcset" scheme for images now applies fixed values (400, 600 & 800px) instead of multipliers (1.0, 1.2 & 1.5) and has 2 new attributes data-file-height= and data-file-width= (which apparently mirrors the actual image's dimensions as uploaded).

As for this template, same issue as FI when the File: string starts on its own line --> creates a paragraph tag for A & IMG that most Users: forget is auto generated and "usurps" the intended container; so DIV never has total "control" &/or ability to cascade CSS settings, etc. to target (IMG) 100% of the time. -- George Orwell III (talk) 22:49, 18 April 2014 (UTC)[reply]

Confusing bSize parameter and cropping differences based on name space for pdf files[edit]

I noticed that bSize parameter is confusing, as it does not tell whether it is width or height. For a given set of parameters, the extracted image seems to differ slightly on the edges when the extracted image is in page namespace vs, when the same is in transcluded to article name space. Example on Telugu wikisource is at https://te.wikisource.org/wiki/%E0%B0%AA%E0%B1%81%E0%B0%9F:Andhrula_Charitramu_Part-1.pdf/142 and the transcluded page at https://te.wikisource.org/wiki/%E0%B0%86%E0%B0%82%E0%B0%A7%E0%B1%8D%E0%B0%B0%E0%B1%81%E0%B0%B2_%E0%B0%9A%E0%B0%B0%E0%B0%BF%E0%B0%A4%E0%B1%8D%E0%B0%B0%E0%B0%AE%E0%B1%81_-_%E0%B0%AA%E0%B1%8D%E0%B0%B0%E0%B0%A5%E0%B0%AE_%E0%B0%AD%E0%B0%BE%E0%B0%97%E0%B0%AE%E0%B1%81/%E0%B0%86%E0%B0%B0%E0%B0%B5_%E0%B0%AA%E0%B1%8D%E0%B0%B0%E0%B0%95%E0%B0%B0%E0%B0%A3%E0%B0%AE%E0%B1%81#.E0.B0.88_.E0.B0.97.E0.B0.BE.E0.B0.A5.E0.B0.AF.E0.B1.8A.E0.B0.95.E0.B1.8D.E0.B0.95_.E0.B0.AA.E0.B1.8D.E0.B0.B0.E0.B0.AF.E0.B1.8B.E0.B0.9C.E0.B0.A8.E0.B0.AE.E0.B1.81. Can somebody confirm and also explore whether it is a bug with proofread page extension.--Arjunaraoc (talk) 04:51, 19 April 2014 (UTC)[reply]

FWIW... Verified. I see the image get clipped a bit on the left-hand side in the article/main namespace when transcluded. -- George Orwell III (talk) 06:01, 19 April 2014 (UTC)[reply]
George Orwell III, thanks for confirming. Using integer power of 2 for example 1024/512 as bSize appears to fix the problem. Check the above links again, as I modified the size as 512.--Arjunaraoc (talk) 04:19, 25 April 2014 (UTC)[reply]
After checking the issue in English with the same pdf file, the problem is determined to be specific to Telugu wikisource setup probably. --Arjunaraoc (talk) 09:52, 5 February 2015 (UTC)[reply]
Problem disappeared after updating template from ENWS. (https://phabricator.wikimedia.org/T88668) --Arjunaraoc (talk) 17:08, 5 February 2015 (UTC)[reply]
bSize refers to the width of the image for which all the dimensions of crop are specified.--Arjunaraoc (talk) 17:10, 5 February 2015 (UTC)[reply]

mobile view[edit]

Why isn't the image indicated by a mobile view? --220.146.34.61 21:18, 26 September 2015 (UTC)[reply]

Strange, as the more than 80% of views of Telugu wikisource are coming from mobile views now. Is there any solution?--Arjunaraoc (talk) 21:55, 6 April 2018 (UTC)[reply]

Rotation[edit]

If the rotation option could be restored, it would be useful. Sometimes a book has a design that appears in various orientations, but only some are clear copies. Kwamikagami (talk) 23:57, 31 July 2022 (UTC)[reply]

Also when cropping a landscape-dimension plate that has been rotated in the original, but should be unrotated for WP. Kwamikagami (talk) 22:11, 27 August 2022 (UTC)[reply]

I got it so it wouldn't mess up the existing functionality, but can't get it to crop properly. Kwamikagami (talk) 23:40, 27 August 2022 (UTC)[reply]