Front-end image upload found image inversion solution Image mirroring effect realization

Picture inversion solution

The front end uses canvas to correct the rotation of the upside-down picture

Image mirroring effect
can be realized by adjusting the direction through scale.
scale(scaleX, scaleY): scales the image by multiplying scaleX on the x-axis and scaleY on the y-axis. The default value of scaleX and scaleY is 1.0.
The image can be flipped through the following settings

scale(1, 1): default
scale(-1,1): horizontal flip
scale(1,-1): vertical flip
scale(-1,-1): horizontal and vertical flip
 

Guess you like

Origin blog.csdn.net/m0_67948827/article/details/127579191