US 11,783,525 B2
Method, device and storage medium form playing animation of a captured image
Qian Wang, Beijing (CN); Yan He, Beijing (CN); Bin Zhang, Beijing (CN); and Bowen Gao, Beijing (CN)
Assigned to BEIJING XIAOMI MOBILE SOFTWARE CO., LTD., Beijing (CN)
Filed by BEIJING XIAOMI MOBILE SOFTWARE CO., LTD., Beijing (CN)
Filed on Jul. 28, 2021, as Appl. No. 17/387,008.
Claims priority of application No. 202110172496.0 (CN), filed on Feb. 8, 2021.
Prior Publication US 2022/0254085 A1, Aug. 11, 2022
Int. Cl. G06T 13/80 (2011.01)
CPC G06T 13/80 (2013.01) 12 Claims
OG exemplary drawing
 
1. A method for playing an animation, comprising:
obtaining a target animation based on a setting operation for switching between a camera application and an image storage program, the target animation being an animation of a target image displayed when switching between the camera application and the image storage program; and
playing the target animation in a transparent window, the transparent window covering an application interface of the camera application as an upper layer of the application interface;
wherein the method further comprises: in response to determining that a size of a frame of the target animation is less than a size of the transparent window, partly displaying a preview image through a remaining region of the transparent window other than a region displaying the frame;
wherein obtaining the target animation comprises:
obtaining a first size of a first frame for the target animation, a second size of a last frame for the target animation, and a playback duration for the target animation, wherein each frame is a thumbnail of the target image;
determining a number based on the playback duration and a respective display duration of each frame;
determining a respective scaling ratio for each frame based on the number of frames, the first size and the second size;
determining multiple frames based on the respective scaling ratio and the target image; and
generating the target animation based on the multiple frames.