Picture frames and boxes require joining two boards to create a right angle. The cleanest way to do that is cutting 45-degree angles at the end of each board, called a mitre cut. Here's the formula to determine the length each of your boards should be cut.
First, measure the size of the glass or photo you want to surround with a frame. Then measure the width (facing you) of the frame material you've chosen. Double that width and and add it to the length and width of the glass you want frame. Those numbers will be the length and width of your frame material.
For example, let's say you want to frame a 20cm x 25cm photo with wood that is 1cm wide. That means the length of two sides of your frame must be cut to 28cm and the other sides must be cut to 23cm in length.
After cutting your 45-degree miter corners the inside of the frame material will be the perfect dimension to fit your photo.