Difference between revisions of "Bobscreen"
From NEC Retro
Ccawley2011 (talk | contribs) |
Ccawley2011 (talk | contribs) (Undo revision 10048 by Ccawley2011 (talk)) Tag: Undo |
||
Line 1: | Line 1: | ||
− | <includeonly>{{#if:{{{noresize|}}}|[[File:{{{1| | + | <includeonly>{{#if:{{{noresize|}}}|[[File:{{{1|}}}{{#if:{{{width|}}}{{{height|}}}|{{!}}}}{{#if:{{{width|}}}|{{{width|}}}}}{{#if:{{{height|}}}|x{{{height|}}}}}{{#if:{{{width|}}}{{{height|}}}|px}}]]|{{let|imagedim={{#replace:{{#mediadimensions:{{{1|}}}}}|,|}}}}{{let|imagew={{#explode:{{#var:imagedim}}|×|0}}|imageh={{#explode:{{#var:imagedim}}|×|1}}}} |
{{let|bsparams={{#switch:{{#var:imagedim}} | {{let|bsparams={{#switch:{{#var:imagedim}} | ||
<!--thumbnail width, display width, display height, crop (top, bottom, left, right)--> | <!--thumbnail width, display width, display height, crop (top, bottom, left, right)--> | ||
Line 102: | Line 102: | ||
left:-{{#expr:{{#var:bsl}}*{{#var:scale}}}}px | left:-{{#expr:{{#var:bsl}}*{{#var:scale}}}}px | ||
"> | "> | ||
− | [[File:{{{1| | + | [[File:{{{1|}}}|{{#expr:trunc({{#var:thumbw}}*{{#var:scale}})}}px|link={{{link|File:{{{1|}}}}}}]] |
</div> | </div> | ||
</div> | </div> |
Revision as of 17:50, 31 December 2021
This template sets the maximum width of a screenshot to 320 pixels, and corrects its aspect ratio.
Usage
{{bobscreen|MagicalPuzzlePopils title.png}}
returns
This is how the game appears on an actual PC Engine. The original image taken from an emulator is below:
Options
{{bobscreen|BariBariDensetsu PCE title.png|width=120}}
returns
"width" also takes into account the adjusted aspect ratio, so the image appears 120 pixels wide even if the source image is not.