An image processing method, applied to an electronic device and comprising: displaying a first interface, wherein the first interface comprises a first control; detecting a first operation on the first control; detecting a second operation, wherein the second operation is used to indicate to enable a night mode of the electronic device, and the night mode is a photographing mode in which an amount of entering light of the electronic device is less than a preset threshold; and in response to detecting the second operation and to detecting that an amount of entering light of the electronic device is less than the preset threshold in a current photographing environment, performing the following steps to obtain a fourth image stream: obtaining a first image stream in response to the first operation, wherein the first image stream is an image stream of a raw domain; converting the first image stream into a second image stream of a RGB domain or a YUV domain according to a demosaicing algorithm; performing downsampling and resampling on the second image stream to obtain a third image stream, wherein the third image stream is an image stream of the raw domain, and a size of the third image stream is less than that of the first image stream; and performing image processing on the third image stream to obtain the fourth image stream, wherein the fourth image stream is a preview image stream. displaying a first interface, wherein the first interface comprises a first control; detecting a first operation on the first control; detecting a second operation, wherein the second operation is used to indicate to enable a night mode of the electronic device, and the night mode is a photographing mode in which an amount of entering light of the electronic device is less than a preset threshold; and in response to detecting the second operation and to detecting that an amount of entering light of the electronic device is less than the preset threshold in a current photographing environment, performing the following steps to obtain a fourth image stream: obtaining a first image stream in response to the first operation, wherein the first image stream is an image stream of a raw domain; converting the first image stream into a second image stream of a RGB domain or a YUV domain according to a demosaicing algorithm; performing downsampling and resampling on the second image stream to obtain a third image stream, wherein the third image stream is an image stream of the raw domain, and a size of the third image stream is less than that of the first image stream; and performing image processing on the third image stream to obtain the fourth image stream, wherein the fourth image stream is a preview image stream. obtaining a first image stream in response to the first operation, wherein the first image stream is an image stream of a raw domain; converting the first image stream into a second image stream of a RGB domain or a YUV domain according to a demosaicing algorithm; performing downsampling and resampling on the second image stream to obtain a third image stream, wherein the third image stream is an image stream of the raw domain, and a size of the third image stream is less than that of the first image stream; and performing image processing on the third image stream to obtain the fourth image stream, wherein the fourth image stream is a preview image stream.