The image comes from the server and is written into the buffer, and then inserted into <img src="..."> . In some cases, the image is inverted and it must be reflected vertically before insertion into <img src="..."> .
Are there any standard tools to flip the data:image/jpeg;base64,... in the buffer?
PS: there is an algorithm in C ++ to reflect RGB, but I don’t want to decode base64, cut the JFIF header, then encode it again ... This is all the additional operation time that is in short supply, especially JS is not C ++ and it doesn’t work so fast.