Actually, you may not need a frame for a bi-fold door at all. A bi-fold door mounts on the floor and on a track overhead. You will need to frame in above the door (a header) so you'll have a place to mount the track..
When you buy the door, the rough opening dimensions will be listed on the box or in the installation instructions. Build your header to the height specified.
But I believe a 32" wide door will work fine in a 32 1/2" opening