Difference between revisions of "Bobscreen"

From Sega Retro

m
Line 8: Line 8:
 
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 256 × 224 | {{#vardefine:scale|1.25}} }}
 
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 256 × 224 | {{#vardefine:scale|1.25}} }}
 
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 256 × 240 | {{#vardefine:scale|1.25}} }}
 
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 256 × 240 | {{#vardefine:scale|1.25}} }}
</div><div style="transform:scalex({{#var:scale}}); transform-origin:50%">[[File:{{{1}}}|{{#var:screenwidth}}px]]</div></includeonly><noinclude>
+
</div><div style="width:{{#expr:{{#var:screenwidth}}*{{#var:scale}}}}px; text-align:center;"><div style="transform:scalex({{#var:scale}}); transform-origin:50%">[[File:{{{1}}}|{{#var:screenwidth}}px]]</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 17: Line 17:
  
 
{{bobscreen|MagicalPuzzlePopils title.png}}
 
{{bobscreen|MagicalPuzzlePopils title.png}}
 +
 +
[[file:MagicalPuzzlePopils title.png]]
  
 
[[Category:Breakout box templates]]
 
[[Category:Breakout box templates]]
 
</noinclude>
 
</noinclude>

Revision as of 19:53, 19 July 2015

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

MagicalPuzzlePopils title.png