g | x | w | all
Bytes Lang Time Link
024Charcoal220119T212816ZNeil
056Haskell220120T141457Zlynn
084JavaScript220120T070544Ztsh
020J220119T223717Zxash
007Jelly220119T204031ZJonathan
106JavaScript ES6220119T201109ZRydwolf

Charcoal, 25 24 bytes

NθWS⊞υιE⪪υθ⭆⪪⌈ιθ⌈⭆ι§⪪νθμ

Try it online! Link is to verbose version of code. Takes the enlargement factor followed by a list of newline-terminated strings. Explanation:

Nθ

Input the enlargement factor.

WS⊞υι

Input the strings.

E⪪υθ⭆⪪⌈ιθ⌈⭆ι§⪪νθμ

Split the list of strings into sublists of length equal to the enlargement factor, split each element of each sublist into strings of the same length, then transpose and take the maximum of the concatenation of each square.

Haskell, 56 bytes

f n|let g[]=[];g x=maximum(take n x):g(drop n x)=g.map g

Try it online!

JavaScript, 84 bytes

a=>n=>a.map((r,i)=>r.map((c,j)=>(d=b[i/n|0]||=[])[x=j/n|0]=d[x]?.trim()||c),b=[])&&b

f=
a=>n=>a.map((r,i)=>r.map((c,j)=>(d=b[i/n|0]||=[])[x=j/n|0]=d[x]?.trim()||c),b=[])&&b

str2mat = str => str.split('\n').map(r => [...r]);
mat2str = mat => mat.map(r => r.join('')).join('\n');
test = (s, n) => console.log(mat2str(f(str2mat(s.slice(1, -1)))(n)));

test(String.raw`
\
 \
  \
`, 3);

test(String.raw`
---------
`, 3);

test(String.raw`
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
`, 3);

test(String.raw`
 | \       / | 
 |  \     /  | 
 |   \___/   | 
 |           | 
 |           | 
 |           | 
   \       /   
    \     /    
     \___/     
`, 3);

test(String.raw`
_______________
\             /
 \           / 
  \         /  
  /         \  
 /           \ 
/             \
\             /
 \           / 
  \_________/  
`, 3);

test(String.raw`
        /\        
       /  \       
      /    \      
     /      \     
    /        \    
   /          \   
  /            \  
 /              \ 
/  ____________  \
       |  |       
       |  |       
       |  |       
       |  |       
       |  |       
       |  |       
     /      \     
    /        \    
___/  ______  \___
`, 3);

test(String.raw`
\        /
 \      / 
  \    /  
   \  /   
    \/    
\        /
 \      / 
  \    /  
   \  /   
    \/    
`, 5);

test(String.raw`
      /             /
     /             / 
    /             /  
   /   -------   /   
  /             /    
 /             /     
/             /      
\             \      
 \             \     
  \             \    
   \   -------   \   
    \             \  
     \             \ 
      \             \
`, 7);

J, 20 bytes

{.@-.&' '@,;.3~2 2&$

Try it online!

With (y x,:h w) u;.3 a we can split a into tiles of size h w while sliding the window by y x. Because we don't want overlapping tiles, we can simply build a 2x2 matrix of the input, e.g. 3 3,:3 3. On these tiles u gets applied, which flattens , the tile into a list, removes any whitespace -.&' ' and then reduces the tile to the first remaining element {..

Jelly, 7 bytes

»/⁹ÐƤ⁺€

A monadic Link accepting a list of lines that yields a list of lines.

Try it online!

How?

»/⁹ÐƤ⁺€ - Link: list of lists of characters, Lines; pixel size, N
   ÐƤ   - for non-overlapping infixes
  ⁹     - ...of length: chain's right argument, N
 /      - ...yield: reduce by:
        -             maximum (vectorises)
                      (Note: space is less than any other character used)
      € - for each:
     ⁺  -   repeat the last link - i.e. do Ṁ⁹ÐƤ

JavaScript (ES6), 106 bytes

x=>n=>x.replace(/.+\n.+\n.+/g,y=>[...(z=y.split`
`)[~-n/2]].map((w,i)=>i%3-1?"":w<"!"?z[n-1][i]:w).join``)

Now actually works!