I went ahead a wrote a C++ application that (hopefully) does what you want and posted it on GitHub.
Given the cylinder x^2 + y^2 = 1 inscribed inside a 2x2x2 cube
centered at the origin, we can project the cylindrical panorama onto the coresponding
four faces of the cube as follows.
For every pixel in the output image we cast a ray from the cube's center at (0,0,0)
through the corresponding point on one of the cube's faces and determine where that
ray intersects the cylinder. We then map this point on the cylinder to the corresponding
point in the input image and (bilinearly) sample the input image at the point.
The resulting pixel color is assigned to the current output pixel.
You can read the gory details in the associated docs.
Here are some thumbnails of the input and output image you suggested:
