Difference between revisions of "BobscreenTest"
From Sega Retro
(added height option) |
|||
Line 75: | Line 75: | ||
|bsr={{#explode:{{#var:bsparams}}|,|6}} | |bsr={{#explode:{{#var:bsparams}}|,|6}} | ||
}}{{getdim|actual={{#var:imagedim}}|w={{#var:thumbw}}|output=h|var=thumbh}}{{let | }}{{getdim|actual={{#var:imagedim}}|w={{#var:thumbw}}|output=h|var=thumbh}}{{let | ||
− | |scale={{#if:{{{width|}}}|{{#expr:{{{width|}}}/{{#var:bsw}}}}|1}} | + | |scale={{#if:{{{width|}}}|{{#expr:{{{width|}}}/{{#var:bsw}}}}|{{#if:{{{height|}}}|{{#expr:{{{height|}}}/{{#var:bsh}}}}|1}}}} |
|hscale={{#expr:{{#var:bsw}}/{{#var:thumbw}}}} | |hscale={{#expr:{{#var:bsw}}/{{#var:thumbw}}}} | ||
|vscale={{#expr:{{#var:bsh}}/{{#var:thumbh}}}} | |vscale={{#expr:{{#var:bsh}}/{{#var:thumbh}}}} |
Revision as of 22:28, 27 May 2021
testing |
---|
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 Sega Game Gear. The original image taken from an emulator is below:
Options
{{BobscreenTest|MagicalPuzzlePopils 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.