Difference between revisions of "Bobscreen"
From NEC Retro
Ccawley2011 (talk | contribs) |
|||
Line 1: | Line 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}}}} | + | <includeonly>{{#if:{{{noresize|}}}|[[File:{{{1|Notavailable.svg}}}{{#if:{{{width|}}}{{{height|}}}|{{!}}}}{{#if:{{{width|}}}|{{{width|}}}}}{{#if:{{{height|}}}|x{{{height|}}}}}{{#if:{{{width|}}}{{{height|}}}|px}}]]|{{let|imagedim={{#replace:{{#mediadimensions:{{{1|Notavailable.svg}}}}}|,|}}}}{{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|}}}|{{#expr:trunc({{#var:thumbw}}*{{#var:scale}})}}px|link={{{link|File:{{{1|}}}}}}]] | + | [[File:{{{1|Notavailable.svg}}}|{{#expr:trunc({{#var:thumbw}}*{{#var:scale}})}}px|link={{{link|File:{{{1|Notavailable.svg}}}}}}]] |
</div> | </div> | ||
</div> | </div> |
Revision as of 21:22, 30 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.