Thus, the first layer has been is saved.
If separate save layers to file, and next save to psd, at that time layers position is correct and image quality is good, and psd file size cca. half the size of the bad file.
Else if layers load from memory and save to psd, at that time layers position is bad and image quality very poor.
MagickImage flattened = psd.Flatten();
psd.Insert(0, flattened);
Positioning in turn found a bug:If separate save layers to file, and next save to psd, at that time layers position is correct and image quality is good, and psd file size cca. half the size of the bad file.
Else if layers load from memory and save to psd, at that time layers position is bad and image quality very poor.