Open an Image in Photoshop .
Now, Select the Rectangular Marquee Tool from the left panel (as shown in image below)
Go to Select option in menu bar, then Modify after that click on Smooth
Then a Smooth Selection Box will appear, this is responsible for- how much rounded will be the corners (Change the number as per your requirement).
Now, again go to Select and click on Inverse
When inverse will be selected it will look like the image given below :
Now Save as .png
That's All...
Now, Select the Rectangular Marquee Tool from the left panel (as shown in image below)
Using the Rectangular Marquee Tool draw a rectangle in way that a small space is left on all sides. (See below)
After then go to Edit then click Cut.
That's All...