Picture of an old friend in ASCII art

CJam, 53 51 49 bytes

q~"ǟ #/?Y__Fy_Nf ǟ"f{'Ƞ^2b_W%+S@+f=}fe*e*N*

Note that three of the characters are unprintable. Try it online!

Background

The right half of the unscaled output is identical to the left one, so it suffices to encode one of them. If we replace spaces with zeroes and non-spaces with ones, we get

1111111111
1000000000
1000000011
1000001111
1000011111
1000111111
1000111111
1000111001
1001111001
1001111111
1001111111
1001100110
1001011001
1001111111
1001101110
1001000110
1000000000
1111111111

where each line can be interpreted as a binary number. This yields

1023 512 515 527 543 575 575 569 633 639 639 614 601 639 622 582 512 1023

The easiest way to encode this information is to replace each integer with the Unicode character at that code point, but they would all require two bytes to be encoded with UTF-8.

By XORing the integers with 544, we keep all but two integers below 128 and avoid null bytes.

The result is

479 32 35 47 63 31 31 25 89 95 95 70 121 95 78 102 32 479

as integers or

ǟ #/?\x1f\x1f\x19Y__Fy_Nf ǟ

as an escaped string.

How it works

q~                e# Read and evaluate all input. This pushes the vscale factor V,
                  e# the hscale factor H, and the character C.
"ǟ #/?Y__Fy_Nf ǟ" e# Push that string.
f{                e# For each character, push C and the character; then:
'Ƞ^               e#   XOR the character with '\u0220' (544), casting to integer.
 2b               e#   Convert from integer to base 2.
 _W%              e#   Push a reversed copy of the binary digits.
 +                e#   Concatenate.
 S@+              e#   Append C to " ".
 f=               e#   Replace each binary digit with ' ' or C.
}                 e#
fe*               e# Repeat each character in each string H times.
e*                e# Repeat each string V times.
N                 e# Join the strings, separating by linefeeds.

Perl, 113 105 104 100 97 96

Added +2 for -ap

Suggestions by dev-null save 9 bytes Fixed wrong count as noticed by Dennis

Run using echo "2 4 %" | perl -ap pacman.pl

pacman.pl:

}for(map+(unpack(aXBXB8Xb8XBXa),$/)x"@F","\xff\x00\x03\x0f\x1f\x3f\x3f\x39\x79\x7f\x7f\x66\x59\x7f\x6e\x46\x00\xff"=~/./g){s%%($&?$F[2]:$")x$F[1]%ge

except that the string "\xff\x00\x03\x0f\x1f\x3f\x3f\x39\x79\x7f\x7f\x66\x59\x7f\x6e\x46\x00\xff" should be written in binary form with single quotes

Space as replacement character becomes the empty string and leads to short lines. But it will all look blank anyways


Dyalog APL, 64 bytes

{/∘⍉/⍺,⊂' '⍵[1+,∘⌽⍨1⍪⍨1⍪1,0⍪⍨0⍪0,0,⍉(7/2)⊤⎕AV⍳'Äâ\⊥⊥∘)⍞⍞┬#⍞`⍒']}

This takes the scale factor as its left argument and the character as its right argument, i.e:

      2 1{/∘⍉/⍺,⊂' '⍵[1+,∘⌽⍨1⍪⍨1⍪1,0⍪⍨0⍪0,0,⍉(7/2)⊤⎕AV⍳'Äâ\⊥⊥∘)⍞⍞┬#⍞`⍒']}'%'
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 %%                                    %% 
 %%              %%%%%%%%              %% 
 %%          %%%%%%%%%%%%%%%%          %% 
 %%        %%%%%%%%%%%%%%%%%%%%        %% 
 %%      %%%%%%%%%%%%%%%%%%%%%%%%      %% 
 %%      %%%%%%%%%%%%%%%%%%%%%%%%      %% 
 %%      %%%%%%    %%%%    %%%%%%      %% 
 %%    %%%%%%%%    %%%%    %%%%%%%%    %% 
 %%    %%%%%%%%%%%%%%%%%%%%%%%%%%%%    %% 
 %%    %%%%%%%%%%%%%%%%%%%%%%%%%%%%    %% 
 %%    %%%%    %%%%    %%%%    %%%%    %% 
 %%    %%  %%%%    %%%%    %%%%  %%    %% 
 %%    %%%%%%%%%%%%%%%%%%%%%%%%%%%%    %% 
 %%    %%%%  %%%%%%    %%%%%%  %%%%    %% 
 %%    %%      %%%%    %%%%      %%    %% 
 %%                                    %% 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

Explanation:

  • ⍉(7/2)⊤⎕AV⍳'Äâ\⊥⊥∘)⍞⍞┬#⍞`⍒': The left half of the ghost, without the border. (It is symmetric.) Each character has its high bit set, to prevent selecting non-printing characters from ⎕AV, but only the first 7 bytes are used.

  • 0,⍪⍨0⍪0,0,: add a border of blanks on the left, top, and bottom

  • 1⍪⍨1⍪1,: add the frame on the left, top, and bottom
  • ,∘⌽⍨: join it with its vertical mirror
  • 1+: add 1, because arrays are 1-indexed by default
  • ' '⍵[...]: use that matrix as an index into the string ' '⍵, so each 0 gets mapped to a blank and each 1 gets mapped to .
  • ⍺,⊂: enclose the matrix and join it to the scale factors
  • /: right fold with the following function:
  • /∘⍉: transpose and scale horizontally