# Scale up an image! [duplicate]

Your task is to write a program/function to scale up an image (list of strings) by a factor of n.

# Specs

• You will receive two inputs: an image, and a positive integer.
• The image will only contain ASCII printable characters (U+0020-U+007F).

# Scoring

This is . Shortest solution in bytes wins.

# Testcases

### Testcase 1

abc
xyz

2

aabbcc
aabbcc
xxyyzz
xxyyzz


### Testcase 2

|_|

3

|||___|||
|||___|||
|||___|||

• Can you please try to use the sandbox next time? I see that you have already gotten negative votes on two previous questions today, and now this one has been marked as a duplicate. – R. Kap May 2 '16 at 6:50

## Actually, 23 bytes

╗'
@s╜;)*(Zk♂ΣiΣnM'
j


Takes the string input (with newlines represented as \ns to make multi-line input work) as the first input and the integer as the second.

Try it online!

Explanation (newlines replaced with \n):

╗'\n@s╜;)*(Zk♂ΣiΣnM'\nj
╗                          push n to reg0
'\n@s                     split s on newlines
╜;)*(Zk♂ΣiΣnM      for each line:
╜;)*(Z                make n copies and zip them
k♂ΣiΣ           join the strings ("abc" -> ["abc", "abc"] -> "aabbcc" with n = 2)
n          make n copies of the result line
'\nj  join on newline

• Actually, this is quite long... (Pyth may need not more than 10 bytes I reckon) – Leaky Nun May 2 '16 at 6:27
• @KennyLau Actually doesn't do well with string manipulation. Its strength is math. – user45941 May 2 '16 at 6:29
• So, this looks like an old answer, but I don't think \n is actually part of CP437. – Erik the Outgolfer Jun 4 '18 at 12:39