Until someone who has a better method can chime in:
In photoshop you have gamma control under image - adjustment - exposure. You can use 2.2 and 0.45 to convert from one space to another. Keep in mind you will lose details and if your source file is 8bit it will have banding artifacts on less rough surfaces.