The saved image is blank, which means that A should be an integer, but it is actually a double type. If the value exceeds the specified value 1.0, it will be displayed in white.
In fact, uint8 () is to convert double into integer data of 0-255, uint8 (unsigned integer, maximum eight bits).
Or you can scale A = A/255, a to the range of 0- 1.0, and then imwrite(A, filemane), and the effect is the same.