Color ramp inversion

Do you expect that the resulting file is bigger than 2GB?
Then this could be an issue. BigTiff is not supported as image format.
You could tailor the data to smaller chunks and create subsets.
I have provided an example graph some time ago which might serve as a starting point for you.

Maybe writing a Python script is an option for you:

It could also be a memory issue. How much RAM does your system have?