Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I am not sure if this is really what you want. But you can try -evaluate divide (or perhaps -fx with bitshift operator) on the alpha channel only. But the bit depth will still be 8-bits, only the graylevel range will be reduced to the desired range (so will be about 8 times darker)
before stream does the trick, still I don't like that "*31/255" part: I'd rather use >> operation (thinking I'm working with integer channel values), but since I got a real number in range [0..1] as input, I can't.
that is the channel and usually it would be referenced as u.a where u references the particular input image, but perhaps "a" is sufficient when you only have one input image or want to process the alpha channel of each input image. I have never tried it that way.