_:nb6b81403b5d4401989cc96af614c02d2xb1
<http://schema.org/text>
"I used the code given below to assign another picture to a black filled picture. The given picture has to fit into the black background at the center so that it looks as if it is framed.\r\nBut the result is:\r\n\r\nI&#39;d like the pic I loaded, (that is j) inside the box. I tried a lot! Please help! Many thanks in advance! :)\r\nj=imread(&#39;1.jpg&#39;);\r\n[na, nb, nc]=size(j);\r\nb=40;\r\nj_big=zeros(na+2*b, nb+2*b, nc);\r\nj_big(b+1:b+na, b+1:b+nb, :)=j;\r\nimshow(j_big);"
<https://www.mathworks.com/matlabcentral/answers/447825-how-to-assign-an-image-to-another-with-a-black-frame?s_tid=prof_contriblnk>