Difference between revisions of "Bobscreen"
From Sonic Retro
BSonirachi (talk | contribs) (nevermind, this broke OmniThumbs) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 32: | Line 32: | ||
| {{#vardefine:bswidth|320}}{{#vardefine:bsheight|{{#expr:{{w2h|{{{1}}}|{{#expr:320/{{#var:hscale}}}}}}*{{#var:vscale}}}} }}}} | | {{#vardefine:bswidth|320}}{{#vardefine:bsheight|{{#expr:{{w2h|{{{1}}}|{{#expr:320/{{#var:hscale}}}}}}*{{#var:vscale}}}} }}}} | ||
}}{{#vardefine:rawwidth|{{#expr:trunc({{#var:bswidth}}/{{#var:hscale}})}}}}{{#ifeq:{{#var:is3d}}|yes|{{#vardefine:bswidth|{{#expr:{{#var:bswidth}}/2}}}}}}<div class="bobscreen" style="width:{{#var:bswidth}}px; height:{{#var:bsheight}}px; display:inline-block; text-align:center; overflow:hidden;"><div style="transform:scale({{#var:hscale}},{{#var:vscale}}); transform-origin:0% 0%; width:{{#var:rawwidth}}px !important;">[[File:{{{1}}}|{{#var:rawwidth}}px{{#if:{{{link|}}}|{{!}}link={{{link|}}}|}}]]</div></div></includeonly><noinclude> | }}{{#vardefine:rawwidth|{{#expr:trunc({{#var:bswidth}}/{{#var:hscale}})}}}}{{#ifeq:{{#var:is3d}}|yes|{{#vardefine:bswidth|{{#expr:{{#var:bswidth}}/2}}}}}}<div class="bobscreen" style="width:{{#var:bswidth}}px; height:{{#var:bsheight}}px; display:inline-block; text-align:center; overflow:hidden;"><div style="transform:scale({{#var:hscale}},{{#var:vscale}}); transform-origin:0% 0%; width:{{#var:rawwidth}}px !important;">[[File:{{{1}}}|{{#var:rawwidth}}px{{#if:{{{link|}}}|{{!}}link={{{link|}}}|}}]]</div></div></includeonly><noinclude> | ||
+ | This template sets the maximum width of a screenshot to 320 pixels, and corrects its aspect ratio. | ||
==Usage== | ==Usage== | ||
<tt><nowiki>{{bobscreen|Sonic Chaos title GG.png}}</nowiki></tt> | <tt><nowiki>{{bobscreen|Sonic Chaos title GG.png}}</nowiki></tt> | ||
Line 37: | Line 38: | ||
returns | returns | ||
{{bobscreen|Sonic Chaos title GG.png}} | {{bobscreen|Sonic Chaos title GG.png}} | ||
− | {{bobscreen|Sonic Chaos title GG.png|link=Sonic | + | This is how the game appears on an actual [[Sega Game Gear]]. The original image taken from an emulator is below: |
+ | |||
+ | [[File:Sonic Chaos title GG.png]] | ||
+ | |||
+ | ===Options=== | ||
+ | <tt><nowiki>{{bobscreen|Sonic Chaos title GG.png|width=120}}</nowiki></tt> | ||
+ | |||
+ | returns | ||
+ | {{bobscreen|Sonic Chaos title GG.png|width=120}} | ||
+ | "width" also takes into account the adjusted aspect ratio, so the image appears 120 pixels wide even if the source image is not. | ||
+ | |||
+ | <tt><nowiki>{{bobscreen|Sonic Chaos title GG.png|link=Sonic Chaos}}</nowiki></tt> | ||
+ | |||
+ | returns | ||
+ | {{bobscreen|Sonic Chaos title GG.png|link=Sonic Chaos}} | ||
+ | |||
+ | <tt><nowiki>{{bobscreen|SonicColours Wii EU Title.png|forcewidescreen=yes}}</nowiki></tt> | ||
+ | |||
+ | returns | ||
+ | {{bobscreen|SonicColours Wii EU Title.png|forcewidescreen=yes}} | ||
+ | "forcewidescreen" is useful for screenshots that rely on [[sega:Anamorphic widescreen|anamorphic widescreen]] to display a 4:3 image as a 16:9 image. | ||
[[Category:Breakout box templates]]</noinclude> | [[Category:Breakout box templates]]</noinclude> |
Latest revision as of 12:53, 5 January 2023
This template sets the maximum width of a screenshot to 320 pixels, and corrects its aspect ratio.
Usage
{{bobscreen|Sonic Chaos title GG.png}}
returns
This is how the game appears on an actual Sega Game Gear. The original image taken from an emulator is below:
Options
{{bobscreen|Sonic Chaos title GG.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.
{{bobscreen|Sonic Chaos title GG.png|link=Sonic Chaos}}
returns
{{bobscreen|SonicColours Wii EU Title.png|forcewidescreen=yes}}
returns
"forcewidescreen" is useful for screenshots that rely on anamorphic widescreen to display a 4:3 image as a 16:9 image.