Try another attempt for reading framebuffer to memory and code cleanup

Detail and test reference #3874