Method and apparatus for sliding image preview and terminal device

By obtaining and rendering thumbnails to display image previews, the black screen problem caused by high-frequency switching in sliding image previews is solved and the display effect is improved.

WO2024212965A1PCT designated stage expired Publication Date: 2024-10-17BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/086835
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-10
Filing Date
2024-04-09
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

When sliding the screen progress bar to quickly preview images, high-frequency image switching can easily lead to a black screen and affect the user experience.

Method used

By detecting image sliding switching operations, image index information is obtained, thumbnails are extracted and rendered for display, and the thumbnails are replaced after the original image is successfully decoded and rendered to avoid a black screen.

Benefits of technology

It effectively avoids the black screen phenomenon when quickly switching images, and improves the display effect of users browsing images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024086835_17102024_PF_FP_ABST
    Figure CN2024086835_17102024_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure relate to a method and apparatus for sliding image preview and a terminal device. The method comprises: when a sliding switch operation on an image in an image set is detected, acquiring index information of at least one to-be-displayed image corresponding to the switch operation process; according to the index information, extracting a thumbnail corresponding to the index information; rendering the thumbnail, and displaying the rendered thumbnail in a first display area in an image preview area; acquiring an original image corresponding to the index information, and decoding and rendering the original image; and after the original image is rendered successfully, switching the displayed thumbnail in the first display area into the original image for display.
Need to check novelty before this filing date? Find Prior Art

Description

Sliding image preview method, device and terminal equipment

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on and claims priority to the Chinese patent application with application number 202310377002.1 and application date April 10, 2023. The disclosed content of the Chinese patent application is hereby introduced as a whole into this application. Technical Field

[0003] The present disclosure relates to the field of computer technology, and more particularly to a method, apparatus, and terminal device for sliding image preview. Background Art

[0004] In a solution of quickly previewing an image by sliding a screen progress bar, if the sliding speed is too fast, a high frequency of image switching will occur, in which case a black screen phenomenon is likely to occur.

[0005] Summary of the Invention

[0006] The present disclosure provides a method, apparatus, and terminal device for sliding image preview.

[0007] In a first aspect, the present disclosure provides a method for sliding image preview, comprising:

[0008] When a sliding switching operation on an image in the image set is detected, obtaining index information of at least one to-be-displayed image corresponding to the switching operation, where the to-be-displayed image is an image in the image set;

[0009] Extracting thumbnails corresponding to the index information according to the index information;

[0010] After the thumbnail is rendered, it is displayed in the first display area in the image preview area;

[0011] Obtain the original image corresponding to the index information, decode and render the original image;

[0012] When the original image is rendered successfully, the thumbnail displayed in the first display area is switched to the original image.

[0013] In a second aspect, the present disclosure provides a device for sliding image preview, the device comprising:

[0014] A detection module, configured to detect a sliding switch operation on an image in an image set;

[0015] an acquisition module configured to, when the detection module detects a sliding switching operation on an image in the image set, acquire index information of at least one to-be-displayed image corresponding to the switching operation, where the to-be-displayed image is an image in the image set;

[0016] A processing module, configured to extract thumbnails corresponding to the index information according to the index information;

[0017] Rendering module, used to render thumbnails;

[0018] A display module, configured to display the thumbnail in a first display area in the image preview area;

[0019] The acquisition module is also used to obtain the original image corresponding to the index information;

[0020] Decoding module, used to decode the original image;

[0021] The rendering module is also used to render the original image;

[0022] The processing module is further configured to switch the thumbnail displayed in the first display area to the original image when the original image is rendered successfully;

[0023] The display module is also used to display the original image.

[0024] In a third aspect, a terminal device is provided, including a processor and a memory;

[0025] Memory for storing computer programs;

[0026] The processor is configured to implement the method for sliding image preview of any one of the embodiments of the first aspect when executing a program stored in the memory.

[0027] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a terminal device, the method for sliding image preview as in any embodiment of the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] FIG1 is a schematic diagram of a page display of a sliding image preview provided by the prior art;

[0029] FIG2 is a schematic flow chart of a method for sliding image preview provided by an embodiment of the present disclosure;

[0030] FIG3 is a schematic diagram of temporarily displaying a placeholder image corresponding to a thumbnail image in a first display area before the original image is successfully rendered, as provided by the present disclosure;

[0031] FIG4 is a flow chart of another method for sliding image preview provided by an embodiment of the present disclosure;

[0032] FIG5 is a flow chart of another method for sliding image preview provided by an embodiment of the present disclosure;

[0033] FIG6 is a schematic structural diagram of a device for sliding image preview provided by an embodiment of the present disclosure;

[0034] FIG7 is a schematic structural diagram of a terminal device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0036] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0037] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0038] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0039] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0040] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0041] To facilitate understanding of the embodiments of the present disclosure, further explanation will be given below with reference to specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present disclosure.

[0042] In a specific application scenario, such as displaying an image collection, in a specific example, the images may include pictures or videos. Taking pictures as an example, a maximum of 100 pictures can be displayed in the displayed image collection. When quickly previewing the pictures in the image collection by sliding the screen progress bar, it can be achieved by sliding the progress bar control at the bottom of the screen. For example, a thumbnail list is used as a progress bar control. The thumbnail list can display more than ten pictures at a time, and at the same time, the selected picture is enlarged, and the large picture of the selected picture is displayed in the large picture display area of ​​the page. When the finger slides on the thumbnail list position, the large picture area displays the large pictures of the pictures in turn, and at the same time, the thumbnail list at the bottom moves in the opposite direction of the finger sliding. When the finger moves from the left end to the right end of the progress bar, the thumbnail list slides to the left to the last picture, and the large picture display area displays the original pictures (large pictures) of the image collection in turn. For details, please refer to Figure 1.

[0043] Figure 1 shows two display areas. The first display area 10 is used to display large images, and the second display area 20 is used to display a list of thumbnails. In the related art, the thumbnails in the thumbnail list are also displayed by reducing the size of the original images after they are downloaded. For example, several large images are pre-loaded, and then the large images are displayed in the first display area 10, and the thumbnails corresponding to the original images are displayed in the second display area 20 as picture previews. When the user needs to view other pictures, a request needs to be made to load thumbnails and large images. As shown in Figure 1, the thumbnail list includes 100 thumbnails, and the cursor 30 currently indicates the 5th thumbnail, so the corresponding first display area 10 currently displays the large image corresponding to the 5th thumbnail. Of course, the images currently downloaded are up to the 5th image. If you need to view the images after that, they need to be downloaded before they can be displayed.

[0044] In the interactive mode where the thumbnail list at the bottom moves in the opposite direction of the finger sliding, there is a scenario where high-frequency picture switching occurs when sliding quickly. In the related art, a picture switching needs to go through three operation links, the first is to request the original picture through the network interface, the second is the encoding and decoding of the picture, and the third is to render the new picture to the screen. The time taken to switch a picture may vary from tens of milliseconds to hundreds of milliseconds due to different network speeds. In the case of poor network speed, it may even take several seconds to display the picture. At this time, the large picture display area is a black screen effect, and the display effect is relatively poor. Taking Figure 1 as an example, when the user performs the picture sliding operation, the first display area 10 will display a black screen because the original picture has not been loaded.

[0045] Therefore, the present application provides a method for sliding image preview to solve the above technical problems. For details, please refer to the following method operations provided in the embodiment of the present disclosure and the corresponding accompanying drawings. Figure 2 is a flow chart of a method for sliding image preview provided in the embodiment of the present disclosure. The method includes:

[0046] In operation S210, when an image sliding switching operation is detected, index information of at least one to-be-displayed image corresponding to the switching operation process is acquired.

[0047] Specifically, the operation of sliding switching of images is performed in the second display area mentioned above. A thumbnail list is displayed in the second display area. It should be noted that the thumbnail list in this application is a thumbnail list composed of multiple thumbnails to be mentioned below. The thumbnails in this application are not large images, but thumbnails corresponding to the large images obtained from the merged thumbnails downloaded from the server in advance. In this way, the loading time is shorter than that of the large image, and it will be displayed in the second display area in a shorter time. Specifically, the image to be displayed is an image in the image collection.

[0048] When a user completes the image switching operation by sliding the thumbnails in the thumbnail list with a finger or electronic stylus, the system can automatically obtain the index information of the image to be displayed. The image to be displayed here is the thumbnail that the user has clicked with a finger or electronic stylus. For example, it can also refer to the original image corresponding to the thumbnail. Each image to be displayed has its own index information, such as number information.

[0049] In operation S220, based on the index information, a thumbnail image corresponding to the index information is extracted.

[0050] In operation S230 , after the thumbnail is rendered, it is displayed in the first display area in the image preview area.

[0051] Specifically, after the thumbnail is rendered, it is displayed in the first display area of ​​the image preview area in order to prevent the occurrence of a black screen on the mobile phone. Because the thumbnails are pre-downloaded, this application only needs to extract the thumbnails from the storage location of the thumbnails according to the index information and perform the rendering operation. The whole process may only take a few milliseconds, and from a visual point of view, this time will not be perceived by the user. From the user's perspective, when the user slides to a thumbnail, the first display area has already displayed the thumbnail. It is equivalent to using thumbnails as placeholders in the first display area to avoid the occurrence of black screen phenomena.

[0052] In an optional embodiment, the thumbnail displayed in the first display area is an enlarged thumbnail, that is, a placeholder image for displaying the thumbnail, and the size may be the same as the size of the original image obtained subsequently.

[0053] In operation S240 , an original image corresponding to the index information is acquired, and the original image is decoded and rendered.

[0054] Specifically, the original image and the thumbnail corresponding to the original image share the same index information, so the thumbnail can be obtained according to the index information, and the original image can also be obtained according to the index information.

[0055] Furthermore, the operation of obtaining the thumbnail and the operation of obtaining the original image can be performed in parallel. When the thumbnail is extracted, the original image is also downloaded and rendered. This makes it convenient to display the original image in the first display area in a timely manner after the original image is downloaded and rendered.

[0056] In operation S250, when the original image is rendered successfully, the thumbnail displayed in the first display area is switched to the original image.

[0057] Specifically, after obtaining the original image, decoding the original image, and then performing a rendering operation, the thumbnail image in the first display area can be replaced with the original image for display, thereby facilitating user viewing and improving display effects.

[0058] Please refer to Figure 3 for details. Figure 3 shows a schematic diagram of temporarily displaying the placeholder image corresponding to the thumbnail in the first display area before the original image is successfully rendered. Figure 3 shows the placeholder image corresponding to the nth thumbnail, where n is a positive integer.

[0059] The sliding image preview method provided by the embodiment of the present disclosure, when a sliding switching operation for an image in an image set is detected, obtains the index information of at least one image to be displayed corresponding to the switching operation process. Then, a thumbnail corresponding to the index information is extracted based on the index information. After the thumbnail is rendered, it is first displayed in the first display area in the image preview area. After the original image corresponding to the index information is obtained, the original image is decoded and rendered, and after the original image is successfully rendered, the thumbnail displayed in the first display area is switched to the original image for display. In this way, the occurrence of a black screen phenomenon when quickly switching images in an image set can be avoided, and the display effect of the user browsing images can be improved.

[0060] In some embodiments, a merged thumbnail is an image created by merging multiple smaller images into a single larger image. As described above, the merged thumbnail is pre-downloaded to the terminal device. Once an image sliding operation is detected, the position of the thumbnail corresponding to the index information can be determined from the pre-configured merged thumbnail based on the index information. The thumbnail is then cropped from the merged thumbnail based on this position information.

[0061] Further optionally, as described above, the merged thumbnail is downloaded to the terminal device in advance. Therefore, before extracting the thumbnail corresponding to the index information according to the index information, the method further includes the following contents, as shown in FIG4 , including:

[0062] In operation S410, a merged thumbnail is acquired.

[0063] Specifically, the merged thumbnail is pre-configured in the server, and when the user needs it, the merged thumbnail can be obtained from the server.

[0064] In operation S420, the merged thumbnail is decoded and stored in a preset storage location.

[0065] Specifically, the terminal needs to decode the merged thumbnail and then save it in a preset storage location. The terminal device can then search and crop the thumbnail in the merged thumbnail according to the index information, and display it in the first display area after rendering is completed.

[0066] Furthermore, if the user swipes to switch images, the switching frequency may exceed the preset image refresh rate. For example, if a collection of 100 images is swiped 120px in 100ms, 12 images need to be displayed. This means 12 image switches occur within 100ms, and the frame rate for image switching is 12 / 0.1s, or 120Hz. Given the 60Hz refresh rate of current flagship phone screens, half of the image switches will not render on the screen even if they are loaded, resulting in invalid loading. Therefore, this solution requires discarding image switches that exceed the screen refresh rate based on the phone's screen refresh rate, i.e., frame dropping. Alternatively, if swiping is very fast and 12 images need to be displayed, but only two can be displayed, two images must be selected from the 12 images for display, i.e., frame dropping. In either of these situations, a target image must be selected from the multiple images to be displayed. Which images to display specifically need to be selected through a priority selection strategy.

[0067] That is, when the image switching frequency is higher than the preset image refresh frame rate, the method further includes the following contents, as shown in FIG5 , including:

[0068] In operation S510, an image to be displayed having a priority higher than a preset level is selected as a target image from at least one image to be displayed according to an image priority selection strategy.

[0069] In operation S520, index information corresponding to the target image is acquired.

[0070] After obtaining the index information corresponding to the target image, operations similar to operation S220 to operation S250 are performed, which is equivalent to displaying only the thumbnail corresponding to the target image in the first display area, and after the original image corresponding to the target image is successfully rendered, the original image corresponding to the target image is displayed in the first display area. The specific operation process will not be repeated here.

[0071] In some embodiments, the priority selection strategy includes one or more of the following:

[0072] First, when the sliding switching operation of the images stops, the selected image has the highest priority.

[0073] The second method is to sort the priorities of the images to be displayed according to the loading stage of the original images corresponding to the images to be displayed, wherein the later the loading stage is, the higher the priority is.

[0074] The third method is to sort the priorities of multiple images to be displayed according to the size of the original images of each image to be displayed when the original images corresponding to the multiple images to be displayed are in the same loading stage, wherein the smaller the original image, the higher the priority.

[0075] Specifically, the image selected when the slide stops has the highest priority. When only one image is selected, the image selected when the slide stops is selected as the target image, and its index information is obtained. Based on this index information, a thumbnail is retrieved and displayed in the first display area. Furthermore, within the loading phase of the original image to be displayed, images in the later stages of the loading phase have higher priority than those in the earlier stages. For example, if the original image corresponding to image A is currently in the network request phase, and the original image corresponding to image B is in the encoding and decoding phase, image B has higher priority. Because the final loading time of the original image corresponding to image B is shorter than that of image A, this strategy prioritizes loading images with shorter loading times. In some special cases, when multiple original images corresponding to images to be displayed are in the same loading phase, smaller images have higher priority. This strategy assumes that smaller images have shorter loading times in subsequent phases and are therefore loaded first. Based on the above priority selection strategy, multiple images to be displayed are sorted according to their priority, and a preset number of images to be displayed are selected from this sorted order as target images.

[0076] Optionally, as described above, the image preview area further includes a second display area; the second display area is used to display thumbnails corresponding to multiple images to be displayed in the image set. Therefore, the priority selection strategy also includes:

[0077] Determine that the closer the to-be-displayed images in the image set are to the to-be-displayed images at the left and right endpoints of the image set, the higher the priority, wherein the to-be-displayed image at the left endpoint and the to-be-displayed image at the right endpoint of the image set have the same priority;

[0078] When the distance between the first image to be displayed and the image to be displayed at the left endpoint is the same as the distance between the second image to be displayed and the image to be displayed at the right endpoint, the first image to be displayed and the second image to be displayed have the same priority, wherein the first image to be displayed and the second image to be displayed are any two thumbnails in the image set.

[0079] Specifically, the priority of images on the sides of a series of images in an image collection is higher than that in the middle. For example, if you need to load images with indexes 21-25, the priority of images with indexes 21-25 is as follows:

[0080] 21>22>23<24<25;

[0081] The starting point of this strategy is that in an image collection, users will be more impressed by the images at the beginning and end of the slide, while the images in the middle are relatively easy to ignore. Therefore, the display of the images at the front and back ends is prioritized, and the images in the middle are discarded.

[0082] Through the above strategy, frames can be extracted or dropped according to a certain strategy based on the screen refresh frame rate and sliding speed, combined with the loading status of the original image corresponding to the image to be displayed and the location of the image to be displayed, thereby reducing the occurrence of invalid image loading and thus reducing the loss of mobile phone performance.

[0083] The above is a method embodiment corresponding to the sliding image preview provided by the present disclosure. The following describes other embodiments corresponding to the sliding image preview provided by the present disclosure. Please refer to the following for details.

[0084] FIG6 is a schematic structural diagram of a sliding image preview device provided by an embodiment of the present disclosure. The device includes: a detection module 601 , an acquisition module 602 , a processing module 603 , a rendering module 604 , a display module 605 , and a decoding module 606 .

[0085] A detection module 601 is configured to detect a sliding switch operation on an image in an image set;

[0086] An acquisition module 602 is configured to, when the detection module 601 detects a sliding switching operation on an image in the image set, acquire index information of at least one to-be-displayed image corresponding to the switching operation, where the to-be-displayed image is an image in the image set;

[0087] The processing module 603 is used to extract the thumbnail corresponding to the index information according to the index information;

[0088] Rendering module 604, used for rendering thumbnails;

[0089] Display module 605, configured to display the thumbnail in the first display area in the image preview area;

[0090] The acquisition module 602 is also used to obtain the original image corresponding to the index information

[0091] A decoding module 606, configured to decode the original image;

[0092] The rendering module 604 is also used to render the original image;

[0093] The processing module 603 is further configured to replace the thumbnail in the first display area when the original image is rendered successfully;

[0094] The display module 605 is also used to display the original image.

[0095] Optionally, the processing module 603 is specifically configured to determine the position of a thumbnail from a preconfigured merged thumbnail, where the merged thumbnail is an image obtained by merging thumbnails corresponding to all images in the image set; and crop a thumbnail from the merged thumbnail according to the position of the thumbnail.

[0096] Optionally, the acquisition module 602 is further configured to acquire a merged thumbnail;

[0097] The decoding module 606 is configured to decode the merged thumbnail and store it in a preset storage location.

[0098] Optionally, when the image switching frequency is higher than the preset image refresh frame rate, the processing module 603 is further configured to select, from the at least one image to be displayed, an image with a priority higher than a preset level as the target image according to the image priority selection strategy;

[0099] The acquisition module 602 is further configured to acquire index information corresponding to the target image.

[0100] Optionally, the priority selection strategy includes one or more of the following:

[0101] When the image sliding switching operation stops, the selected image has the highest priority;

[0102] Sort the priority of the images to be displayed according to the loading stage of the original images corresponding to the images to be displayed, wherein the later the loading stage, the higher the priority;

[0103] When there are multiple images to be displayed whose corresponding original images are in the same loading stage, the priorities of the multiple images to be displayed are sorted according to the original image size of each image to be displayed, wherein the smaller the original image, the higher the priority.

[0104] Optionally, the image preview area further includes a second display area;

[0105] The second display area is used to display thumbnails corresponding to multiple images to be displayed in the image set.

[0106] Optionally, the priority selection strategy also includes:

[0107] Determine that the closer the to-be-displayed images in the image set are to the to-be-displayed images at the left and right endpoints of the image set, the higher the priority, wherein the to-be-displayed image at the left endpoint and the to-be-displayed image at the right endpoint of the image set have the same priority;

[0108] When the distance between the first image to be displayed and the image to be displayed at the left endpoint is the same as the distance between the second image to be displayed and the image to be displayed at the right endpoint, the first image to be displayed and the second image to be displayed have the same priority, wherein the first image to be displayed and the second image to be displayed are any two thumbnails in the image set.

[0109] The functions performed by the various components in the apparatus for sliding image preview provided by the embodiments of the present disclosure have been described in detail in the above embodiments, and thus will not be repeated here.

[0110] An embodiment of the present disclosure provides a device for sliding image preview. When a sliding switching operation for an image in an image set is detected, index information of at least one image to be displayed corresponding to the switching operation process is obtained. Then, a thumbnail corresponding to the index information is extracted according to the index information. After the thumbnail is rendered, it is first displayed in the first display area in the image preview area. When the original image corresponding to the index information is obtained, the original image is decoded and rendered, and after the original image is successfully rendered, the thumbnail displayed in the first display area is switched to the original image for display. In this way, the occurrence of a black screen phenomenon when quickly switching images in an image set can be avoided, and the display effect of the user browsing images can be improved.

[0111] As shown in FIG7 , an embodiment of the present disclosure provides a terminal device, which includes at least a processor 111 and a memory 112 , wherein the processor 111 and the memory 112 communicate with each other via a communication bus.

[0112] Memory 112, for storing computer programs;

[0113] In one embodiment of the present disclosure, the processor 111 is configured to execute a program stored in the memory 112 to implement the method for sliding image preview provided in any of the aforementioned embodiments, including:

[0114] When a sliding switching operation on an image in the image set is detected, obtaining index information of at least one to-be-displayed image corresponding to the switching operation, where the to-be-displayed image is an image in the image set;

[0115] Extracting thumbnails corresponding to the index information according to the index information;

[0116] After the thumbnail is rendered, it is displayed in the first display area in the image preview area;

[0117] Obtain the original image corresponding to the index information, decode and render the original image;

[0118] When the original image is rendered successfully, the thumbnail displayed in the first display area is switched to the original image.

[0119] Optionally, extracting a thumbnail corresponding to the index information according to the index information includes:

[0120] Determine the position of the thumbnail from the pre-configured merged thumbnail, where the merged thumbnail is an image obtained by merging the thumbnails corresponding to all images in the image collection;

[0121] Crop thumbnails from the merged thumbnail based on their positions.

[0122] Optionally, before extracting the thumbnail corresponding to the index information according to the index information, the method further includes:

[0123] Get the merged thumbnail;

[0124] After the merged thumbnail is decoded, it is stored in a preset storage location.

[0125] Optionally, when the image switching frequency is higher than a preset image refresh frame rate, the method further includes:

[0126] From at least one image to be displayed, an image to be displayed having a priority higher than a preset level is selected as a target image according to an image priority selection strategy, and index information corresponding to the target image is obtained.

[0127] Optionally, the priority selection strategy includes one or more of the following:

[0128] When the image sliding switching operation stops, the selected image has the highest priority;

[0129] Sort the priority of the images to be displayed according to the loading stage of the original images corresponding to the images to be displayed, wherein the later the loading stage, the higher the priority;

[0130] When there are multiple images to be displayed whose corresponding original images are in the same loading stage, the priorities of the multiple images to be displayed are sorted according to the original image size of each image to be displayed, wherein the smaller the original image, the higher the priority.

[0131] Optionally, the image preview area further includes a second display area;

[0132] The second display area is used to display thumbnails corresponding to multiple images to be displayed in the image set.

[0133] Optionally, the priority selection strategy also includes:

[0134] Determine that the closer the to-be-displayed images in the image set are to the to-be-displayed images at the left and right endpoints of the image set, the higher the priority, wherein the to-be-displayed image at the left endpoint and the to-be-displayed image at the right endpoint of the image set have the same priority;

[0135] When the distance between the first image to be displayed and the image to be displayed at the left endpoint is the same as the distance between the second image to be displayed and the image to be displayed at the right endpoint, the first image to be displayed and the second image to be displayed have the same priority, wherein the first image to be displayed and the second image to be displayed are any two thumbnails in the image set.

[0136] An embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a terminal device, the method for sliding image preview provided in the aforementioned method embodiment is implemented.

[0137] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device that includes the element.

[0138] The foregoing are merely specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not to be limited to the embodiments shown herein, but is to be construed in the broadest manner consistent with the principles and novel features claimed herein.

Claims

1. A method for sliding image preview, the method comprising: When a sliding switching operation on an image in the image set is detected, obtaining index information of at least one to-be-displayed image corresponding to the switching operation process, the to-be-displayed image being an image in the image set; According to the index information, extracting a thumbnail corresponding to the index information; After rendering the thumbnail, the thumbnail is displayed in the first display area in the image preview area; Obtaining an original image corresponding to the index information, and decoding and rendering the original image; When the original image is rendered successfully, the thumbnail displayed in the first display area is switched to the original image.

2. The method according to claim 1, wherein: The extracting the thumbnail corresponding to the index information according to the index information specifically includes: Determining the position of the thumbnail from pre-configured merged thumbnails, where the merged thumbnail is an image obtained by merging thumbnails corresponding to all images in the image set; The thumbnail is cropped from the merged thumbnail according to the position of the thumbnail.

3. The method according to claim 2, wherein: Before extracting the thumbnail corresponding to the index information according to the index information, the method further includes: Obtaining the merged thumbnail; After the merged thumbnail is decoded, it is stored in a preset storage location.

4. The method according to any one of claims 1 to 3, wherein: When the image switching frequency is higher than the preset image refresh frame rate, the method further includes: From at least one of the images to be displayed, select according to the image priority selection strategy The to-be-displayed images with a priority level higher than a preset level are taken as target images, and index information corresponding to the target images is obtained.

5. The method according to claim 4, wherein: The priority selection strategy includes one or more of the following: When the image sliding switching operation stops, the selected image has the highest priority; sorting the priorities of the images to be displayed according to the loading stages of the original images corresponding to the images to be displayed, wherein the later the loading stage is, the higher the priority is; When there are multiple original images corresponding to the images to be displayed in the same loading stage, the priorities of the multiple images to be displayed are sorted according to the size of the original images of each image to be displayed, wherein the smaller the original image, the higher the priority.

6. The method according to claim 4, wherein: The image preview area also includes a second display area; The second display area is used to display thumbnails corresponding to a plurality of the to-be-displayed images in the image set.

7. The method according to claim 6, wherein: The priority selection strategy also includes: Determine that the image to be displayed in the image set that is closer to the images to be displayed at the left and right endpoints of the image set has a higher priority, wherein the image to be displayed at the left endpoint and the image to be displayed at the right endpoint of the image set have the same priority; When the distance between the first image to be displayed and the image to be displayed at the left endpoint is the same as the distance between the second image to be displayed and the image to be displayed at the right endpoint, the first image to be displayed and the second image to be displayed have the same priority, wherein the first image to be displayed and the second image to be displayed are any two thumbnails in the image set.

8. A device for sliding image preview, the device comprising: A detection module, used for detecting a sliding switching operation on an image in an image set; an acquisition module, configured to acquire index information of at least one to-be-displayed image corresponding to the switching operation process when the detection module detects a sliding switching operation on an image in the image set, wherein the to-be-displayed image is an image in the image set; A processing module, configured to extract thumbnails corresponding to the index information according to the index information; A rendering module, used for rendering the thumbnail; A display module, used for displaying the thumbnail in a first display area in the image preview area; The acquisition module is further used to acquire the original image corresponding to the index information; A decoding module, used for decoding the original image; The rendering module is further used to render the original image; The processing module is further configured to switch the thumbnail displayed in the first display area to the original image when the original image is rendered successfully; The display module is also used to display the original image.

9. A terminal device, comprising: Memory, used to store computer programs; The processor is used to implement the method for sliding image preview according to any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a terminal device, implements the method for sliding image preview according to any one of claims 1 to 7.

11. A computer program, comprising instructions, which, when executed by a processor, implement the method for sliding image preview according to any one of claims 1 to 7.

12. A computer program product, comprising instructions, which when executed by a processor implement the method for sliding image preview according to any one of claims 1-7.

Citation Information

Patent Citations

  • Pictorial information loading method and related device

    CN103902575A

  • Image searching method and device and readable storage medium

    CN111046205A

  • Image display method, image display device, electronic equipment, medium and product

    CN115421833A

  • Information display method and device, electronic equipment and storage medium

    CN115935099A

  • Thumbnail image preview apparatus and method thereof

    TW201337600A