Difference between revisions of "BobscreenTest"

From Sega Retro

(victory??)
Line 18: Line 18:
 
{{#vardefine:vmargin|{{#expr:({{#var:calculatedheight}}-{{#var:imageheight}}/2)}}}}
 
{{#vardefine:vmargin|{{#expr:({{#var:calculatedheight}}-{{#var:imageheight}}/2)}}}}
  
</div>
+
</div><div class="bobscreen" style="width:{{#var:calculatedwidth}}px; height:{{#var:calculatedheight}}px; display:inline-block; text-align:center;"><div style="transform:scale({{#var:xscale}},{{#var:yscale}}); margin-left: {{#var:hmargin}}px; margin-right: {{#var:hmargin}}px; transform-origin:50%;">[[File:{{{1}}}]]</div></div></includeonly><noinclude>
*{{#var:imagewidth}}x{{#var:imageheight}}
 
*{{#var:calculatedwidth}}x{{#var:calculatedheight}} -> SX:{{#var:xscale}}, SY:{{#var:yscale}} -> HM:{{#var:hmargin}}, VM:{{#var:vmargin}}
 
 
 
<div class="bobscreen" style="width:{{#var:calculatedwidth}}px; height:{{#var:calculatedheight}}px; display:inline-block; overflow: hidden; text-align:center;"><div style="vertical-align:top;  transform:scale({{#var:xscale}},{{#var:yscale}}); margin-left: {{#var:hmargin}}px; margin-right: {{#var:hmargin}}px; transform-origin:50% 0%; background-color:#ff0000;">[[File:{{{1}}}]]</div></div></includeonly><noinclude>
 
  
 
This template sets the maximum width of a screenshot to 320 pixels, and corrects its aspect ratio.
 
This template sets the maximum width of a screenshot to 320 pixels, and corrects its aspect ratio.
Line 70: Line 66:
  
 
widescreen h200 [[File:VirtuaFighter 32X Widescreen2 PAL.png]] -> {{bobscreenTest|VirtuaFighter 32X Widescreen2 PAL.png|forcewidescreen=yes|height=200}}
 
widescreen h200 [[File:VirtuaFighter 32X Widescreen2 PAL.png]] -> {{bobscreenTest|VirtuaFighter 32X Widescreen2 PAL.png|forcewidescreen=yes|height=200}}
TODO: Get width parameter to work properly here.
 
  
 
[[Category:Breakout box templates]]
 
[[Category:Breakout box templates]]
 
</noinclude>
 
</noinclude>

Revision as of 14:30, 4 July 2018


This template sets the maximum width of a screenshot to 320 pixels, and corrects its aspect ratio.

Usage

{{bobscreen|MagicalPuzzlePopils title.png}}

returns










MagicalPuzzlePopils title.png

This is how the game appears on an actual Sega Game Gear. The original image taken from an emulator is below:

MagicalPuzzlePopils title.png

Options

{{bobscreenTest|MagicalPuzzlePopils title.png|width=120}}

returns










MagicalPuzzlePopils title.png

"width" also takes into account the adjusted aspect ratio, so the image appears 120 pixels wide even if the source image is not.

Height

In addition, this template corrects heights:

WinterHeat title.png ->










WinterHeat title.png


ClockworkKnightUSPAL Title.png ->










ClockworkKnightUSPAL Title.png


NiGHTS title.png ->










NiGHTS title.png


NiGHTS title.png ->










NiGHTS title.png

Anamorphic widescreen

widescreen VirtuaFighter 32X Widescreen2.png ->










VirtuaFighter 32X Widescreen2.png


widescreen VirtuaFighter 32X Widescreen2 PAL.png ->










VirtuaFighter 32X Widescreen2 PAL.png


widescreen w200 VirtuaFighter 32X Widescreen2 PAL.png ->










VirtuaFighter 32X Widescreen2 PAL.png


widescreen h200 VirtuaFighter 32X Widescreen2 PAL.png ->










VirtuaFighter 32X Widescreen2 PAL.png