0
Husk, 29 bytes
mm;₁'#⁰₁'+²RR'X
‼(T₂³¹m↔₂
m+R
Try it online!
Ah, this was convoluted.
The input order is Matte,Frame,Width,Height.
Explanation
Function ₂: appends a side
m+R parameters a(char),n(int),m(matrix)
R Repeat the input character a n times
m+ join it with each row of m
Function ₁: fr...