A method and apparatus for picture display

By adjusting the size of the second control and the target image to be displayed on the first control, the problem of image content being compressed caused by different device resolutions is solved, and the quality of image display is improved.

CN110658966BActive Publication Date: 2025-06-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201910877921.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-17
Publication Date
2025-06-24
Estimated Expiration
2039-09-17

AI Technical Summary

Technical Problem

Different resolutions of different types of electronic devices lead to changes in the size of controls in the application, causing the problem of compressing the image content.

Method used

By determining the size of the target picture and the first control, adjusting the size of the second control and the size of the target picture, the second control overwrites the first control, and playing the dynamic effect of the adjusted target picture, and loading the adjusted target picture into the adjusted second control.

Benefits of technology

This avoids the compression of the image content and improves the image quality when displaying the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110658966B_ABST
    Figure CN110658966B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses a method and device for picture display. The picture display method includes determining the size of a target picture; determining the size of a first control; adjusting the size of a second control and the size of the target picture according to the size of the target picture and the size of the first control, where the second control covers the first control and is used to play the dynamic effect of the adjusted target picture; loading the adjusted target picture into the adjusted second control so that the adjusted target picture is displayed on the first control. It is possible to avoid compression of the content of the picture and improve the picture quality during picture display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and particularly to a method and device for image display. Background Art

[0002] With the development of technology, there are more and more application programs that can be installed on electronic devices, such as mobile terminals and personal digital assistants. For business promotion, operators will release the same product in the application stores of different types of electronic devices for users to download and use, such as tablet computers and mobile phones. And the controls of the application program are linked with pictures to achieve better operation effects.

[0003] Currently, due to the different resolutions of different types of electronic devices, the size of the controls in the application program will change with the resolution of the electronic device, resulting in the inability to match the size of the controls with the size of the pictures, thus causing the content in the pictures to be compressed. Summary of the Invention

[0004] The embodiments of this application provide a method and device for image display, which can improve the integrity of data processing.

[0005] The embodiments of this application provide a method for image display, including:

[0006] Determine the size of the target picture, where the target picture is an animated picture;

[0007] Determine the size of the first control for displaying the target picture;

[0008] According to the size of the target picture and the size of the first control, adjust the size of the second control and the size of the target picture, where the second control covers the first control and is used to play the dynamic effect of the adjusted target picture;

[0009] Load the adjusted target picture into the adjusted second control so that the adjusted target picture is displayed on the first control.

[0010] In some embodiments, the size of the target picture includes the picture length and picture width of the target picture, and the size of the first control includes the first length and first width of the first control. The adjusting the size of the second control and the size of the target picture according to the size of the target picture and the size of the first control includes:

[0011] Take the first length as the second length;

[0012] Calculate the first ratio of the first length to the picture length;

[0013] Determine a second width according to the first ratio and the width of the picture;

[0014] Adjust the size of the second control and the size of the target picture according to the second length and the second width.

[0015] In some embodiments, before determining the size of the target picture, it further includes:

[0016] Obtain the download address information of the target picture;

[0017] Match whether the target picture exists in the database according to the download address information to obtain a matching result;

[0018] Obtain the target picture based on the download address information and the matching result.

[0019] In some embodiments, the obtaining the target picture based on the download address information and the matching result includes:

[0020] If the matching result is that the target picture exists in the database, obtain the target picture from the database.

[0021] In some embodiments, the obtaining the target picture based on the download address information and the matching result includes:

[0022] If the matching result is that the target picture does not exist in the database, obtain the target picture according to the download address information.

[0023] In some embodiments, after obtaining the target picture based on the download address information and the matching result, it further includes:

[0024] Compare the picture type of the target picture with a preset picture type;

[0025] If the picture type of the target picture is different from the preset picture type, clear the obtained target picture.

[0026] Correspondingly, an embodiment of the present application further provides a picture display device, including:

[0027] A first determination unit, configured to determine the size of a target picture, where the target picture is an animated picture;

[0028] A second determination unit, configured to determine the size of a first control for displaying the target picture;

[0029] An adjustment unit, configured to adjust the size of the second control and the size of the target picture according to the size of the target picture and the size of the first control, where the second control covers the first control and is used to play the dynamic effect of the adjusted target picture;

[0030] A loading unit, configured to load the adjusted target picture into the adjusted second control, so that the adjusted target picture is displayed on the first control.

[0031] In some embodiments, the size of the target picture includes the picture length and picture width of the target picture, the size of the first control includes the first length and first width of the first control, and the adjustment unit includes:

[0032] A calculation subunit, configured to use the first length as the second length and calculate the first ratio of the first length to the picture length;

[0033] A determination subunit, configured to determine the second width according to the first ratio and the picture width;

[0034] An adjustment subunit, configured to adjust the size of the second control and the size of the target picture according to the second length and the second width.

[0035] In some embodiments, the picture display device further includes:

[0036] A first acquisition unit, configured to acquire the download address information of the target picture;

[0037] A matching unit, configured to match whether the target picture exists in the database according to the download address information, and obtain a matching result;

[0038] A second acquisition unit, configured to acquire the target picture based on the download address information and the matching result.

[0039] In some embodiments, the picture display device further includes:

[0040] A comparison unit, configured to compare the picture type of the target picture with a preset picture type;

[0041] A clearing unit, configured to clear the acquired target picture if the picture type of the target picture is different from the preset picture type.

[0042] Correspondingly, an embodiment of the present application further provides a storage medium, where the storage medium stores instructions, and when the instructions are executed by a processor, the picture display method provided in any embodiment of the present application is implemented.

[0043] The picture display method provided by the embodiment of the present application includes determining the size of a target picture, where the target picture is a dynamic picture; determining the size of a first control for displaying the target picture; adjusting the size of a second control and the size of the target picture according to the size of the target picture and the size of the first control, where the second control covers the first control and is used to play the dynamic effect of the adjusted target picture; and loading the adjusted target picture into the adjusted second control so that the adjusted target picture is displayed on the first control. This can avoid the content of the picture from being compressed and improve the picture quality when the picture is displayed. Description of the Drawings

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0045] Figure 1 It is the first flow schematic diagram of the picture display method provided by the embodiment of the present application.

[0046] Figure 2 It is the second flow schematic diagram of the picture display method provided by the embodiment of the present application.

[0047] Figure 3a It is the first scenario schematic diagram of the picture display method provided by the embodiment of the present application.

[0048] Figure 3b It is the second scenario schematic diagram of the picture display method provided by the embodiment of the present application.

[0049] Figure 3c It is the third scenario schematic diagram of the picture display method provided by the embodiment of the present application.

[0050] Figure 4 It is the first structural schematic diagram of the picture display device provided by the embodiment of the present application.

[0051] Figure 5 It is the second structural schematic diagram of the picture display device provided by the embodiment of the present application.

[0052] Figure 6 It is the structural schematic diagram of the terminal provided by the embodiment of the present application. Detailed Embodiments

[0053] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application.

[0054] The embodiments of the present application provide a data processing method, apparatus, and storage medium.

[0055] Among them, the processing device of the graphical interface can be specifically integrated in devices such as terminals, such as mobile phones, notebook computers, tablet PCs (Personal Computers), etc. Various applications required by users can be installed in the terminal, such as applications with entertainment functions (such as video applications, audio playback applications, game applications, reading software, browser applications), and applications with service functions (such as map navigation applications, dining applications, etc.).

[0056] Specifically, please refer to Figure 1 , Figure 1 which is the first flowchart of the picture display method provided by the present invention. The picture display method includes:

[0057] Step 101, determine the size of the target picture.

[0058] Specifically, the target picture is an animated picture, such as a picture in GIF format. This format of picture reads and displays multiple image data one by one to form a simple animation, that is, a dynamic effect. The target picture is generally designed by the operator and associated with certain application programs operated by the operator to display the target picture in the application program.

[0059] Among them, to determine the size of the target picture, the target picture can be converted into the GifDrawable type. Taking the Android system as an example, it has multiple sub-types of Drawable built-in, such as ColorDrawable, GradientDrawable, BitmapDrawable, NinePatchDrawable, InsetDrawable, etc. Each sub-type implements a specific function. And GifDrawable is also a sub-type in the Drawable type, which is used to implement the display of Gif pictures. It contains various information of the Gif. After converting the target picture into the GifDrawable type, the size of the target picture can be obtained through the Gif decoding library. The size specifically includes the length and width of the target picture.

[0060] Specifically, when the user operates the terminal to open the application, it is necessary to obtain the target picture in advance. Generally, there are two methods to obtain the target picture. The first method is that when the application is started for the first time or the target picture appears for the first time after the operator updates the application, the target picture can be downloaded by obtaining the download address information of the target picture. The download address information here can be a Uniform Resource Locator (URL), but is not limited to URL. The second method is that the target picture has been obtained before and saved in the corresponding database in the memory, disk or external memory card (SDK) of the terminal. Therefore, it is possible to check whether the target picture exists in the database according to the download address information of the target picture. If it exists, the target picture can be directly extracted. Therefore, before step 101, it may further include:

[0061] Obtain the download address information of the target picture;

[0062] Match whether the target picture exists in the database according to the download address information to obtain a matching result;

[0063] Obtain the target picture based on the download address information and the matching result.

[0064] Among them, if the matching result is that the target picture does not exist in the database, the target picture is obtained according to the download address information. After obtaining the target picture, the target picture can be stored in the database of the terminal, and the target picture is named with the download address information of the target picture, or the download address information can be processed by encoding or algorithms, etc., and the target picture is named with the processed download address information. Therefore, matching whether the target picture exists in the database according to the download address information may include:

[0065] Match whether the target picture named with the download address information exists in the database to obtain a matching result.

[0066] In some embodiments, matching whether the target picture exists in the database according to the download address information may include:

[0067] Process the download address information by encoding or algorithms to obtain the processed download address information;

[0068] Match whether the target picture named with the processed download address information exists in the database to obtain a matching result.

[0069] When the matching result is that the target picture exists in the database, obtain the target picture from the database. This can prevent the user from automatically downloading the target picture when opening the application through traffic, resulting in wasted traffic.

[0070] After obtaining the target image, it is also necessary to verify the image type of the target image to determine whether the target image conforms to the protocol specifications of the dynamic image format. For example, it is determined whether the image type of the target image is of the Gif type. Therefore, after obtaining the target image based on the download address information and the matching result, it may further include:

[0071] Compare the image type of the target image with a preset image type;

[0072] If the image type of the target image is different from the preset image type, the obtained target image is cleared.

[0073] It can be understood that if the image type of the target image does not conform to the protocol specifications of the dynamic image format, it cannot be linked with the application program. Therefore, the target image is cleared.

[0074] Step 102: Determine the size of the first control.

[0075] Among them, the first control is a control for implementing one or more functions in the application program. Taking the application program as a browser as an example, the first control can be a control for implementing the search in the browser or the browser setting function in the browser, or a control for implementing other functions, which will not be elaborated here.

[0076] Determining the size of the first control refers to the size of the application program displayed on the user device. Since the display area sizes of different devices are different, the size of the first control displayed on the user device will also change with the display area size of the device. That is, the display area sizes of different devices result in different actual displayed sizes of the first control.

[0077] For example: The display area of device A is 15 cm wide and 20 cm high; the display area of device B is 30 cm wide and 20 cm high. And in the application program, there are 3 controls with the same size and adjacent to each other horizontally (including the first control), and the length of the control fills the height of the device display area. Therefore, the size of the first control in device A is 5 cm wide and 20 cm high, and the size of the first control in device B is 10 cm wide and 20 cm high. It should be noted that this is only an actual example here, and the size of the first control can also be obtained by other means, which will not be elaborated here. And in this embodiment, the steps do not need to be executed in the chronological order. For example, for step 101 and step 102, step 102 can be executed before step 101, or can be executed simultaneously with step 101, which is not limited here.

[0078] Step 103: Adjust the size of the second control and the size of the target image according to the size of the target image and the size of the first control.

[0079] Specifically, the second control is a control that can play the dynamic effect of the target picture. The linkage between the target picture and the first control means covering a control that can play the dynamic effect of the target picture on the first control so that the target picture is displayed in the first control. The target picture can fill the entire second control, that is, the size of the second space determines the size of the target picture. Therefore, after obtaining the size of the target picture and the size of the first control in steps 101 and 102 respectively, the size of the second control and the size of the target picture can be adjusted according to the size of the target picture and the size of the second control.

[0080] Among them, the adjustment method can be taking the height of the first control as the height of the second control; furthermore, according to the size of the target picture and the size of the first control, adjusting the size of the second control and the size of the target picture can include:

[0081] Taking the first length as the second length;

[0082] Calculating the first ratio of the first length to the picture length;

[0083] Determining the second width according to the first ratio and the picture width;

[0084] Adjusting the size of the second control and the size of the target picture according to the second length and the second width. That is, gifViewHeight = viewHeight; gitViewWidth = gifWidth × viewHeight / gifHeight; where viewHeight is the first length of the first control, gifViewHeight is the second length, gifWidth is the picture width of the target picture, and gitViewWidth is the second width. Of course, the above is taking the first length of the first control as the second length and then calculating the second width. Similarly, the first width of the second space can also be taken as the second width and then calculate the second length, which is not limited here.

[0085] Step 104: Load the adjusted target picture into the adjusted second control.

[0086] Among them, after adjusting the target picture and the second control, load the adjusted target picture into the adjusted second control so that the adjusted target picture plays in the adjusted second control. Since the second control covers the first control and has a linkage effect, the adjusted target picture can be displayed on the first control.

[0087] As described above, in the embodiments of the present application, the size of the target picture is determined, and the target picture is a dynamic picture; the size of the first control is determined, and the first control is used to display the target picture; according to the size of the target picture and the size of the first control, the size of the second control and the size of the target picture are adjusted, where the second control covers the first control and is used to play the dynamic effect of the adjusted target picture; the adjusted target picture is loaded into the adjusted second control so that the adjusted target picture is displayed on the first control. This can avoid the content of the picture being compressed and improve the picture quality when the picture is displayed.

[0088] In some embodiments, as Figure 2 shown, Figure 2 FIG. 2 is a second flowchart of the picture display method provided by the embodiments of the present application. The picture display method includes:

[0089] Step 201, obtain the download address information of the target picture.

[0090] Among them, when the user operates the terminal to start the application program, the target picture in the application program needs to be loaded, and the download address information can be a Uniform Resource Locator (URL), but is not limited to URL.

[0091] Step 202, match whether the target picture exists in the database according to the download address information to obtain a matching result.

[0092] Specifically, there are generally two methods to obtain the target picture. The first is that when the application program is started for the first time or the operator updates the application program and the target picture appears for the first time, the target picture can be downloaded through the download address information of the target picture; the second is that the target picture has been obtained before and saved in the corresponding database in the memory, disk or external memory card (SDK) of the terminal. Therefore, it can be checked whether the target picture exists in the database according to the download address information of the target picture. If it exists, the target picture can be directly extracted.

[0093] Step 203, if the matching result is that the target picture exists in the database, obtain the target picture from the database.

[0094] It can be understood that after obtaining the target picture, the target picture can be stored in the database of the terminal, named with the download address information of the target picture, or the download address information can be processed through coding or algorithms, etc., and the target picture can be named with the processed download address information.

[0095] Therefore, matching whether the target picture exists in the database according to the download address information may include:

[0096] Match whether there is a target picture named with the download address information in the database according to the download address information, and obtain a matching result.

[0097] In some embodiments, matching whether there is a target picture in the database according to the download address information may include:

[0098] Process the download address information through encoding or algorithms to obtain the processed download address information;

[0099] Match whether there is a target picture named with the processed download address information in the database, and obtain a matching result.

[0100] When the matching result is that there is a target picture in the database, obtain the target picture from the database. Avoid the user from automatically downloading the target picture when opening the application through traffic, resulting in waste of traffic.

[0101] In this way, if the target picture is matched in the database, it can be directly obtained from the database.

[0102] Step 204: If the matching result is that there is no target picture in the database, obtain the target picture according to the download address information.

[0103] It can be understood that if the target picture does not exist in the database, directly download and obtain the target picture according to the download address information.

[0104] Step 205: Determine whether the picture type of the target picture is the same as the preset picture type. If it is the same, execute Step 207; if it is not the same, execute Step 206.

[0105] Among them, after obtaining the target picture, it is also necessary to verify the picture type of the target picture to determine whether the target picture conforms to the protocol specification of the dynamic picture format. For example: determine whether the picture type of the target picture is the Gif type.

[0106] Step 206: Clear the obtained target picture.

[0107] Among them, when the picture type of the obtained target picture does not conform to the protocol specification of the dynamic picture format and cannot be linked with the application program, that is, when the dynamic effect cannot be played, clear the obtained target picture.

[0108] Step 207: Determine the size of the target picture.

[0109] Specifically, the target picture is an animated picture, such as a picture in GIF format. This format of picture reads and displays multiple image data one by one to form a simple animation, that is, a dynamic effect. Generally, the target picture is designed by the operator and associated with certain application programs operated by the operator to display the target picture in the application program.

[0110] Among them, to determine the size of the target picture, the target picture can be converted into the GifDrawable type. Taking the Android system as an example, it has multiple sub-types of Drawable built-in, such as ColorDrawable, GradientDrawable, BitmapDrawable, NinePatchDrawable, InsetDrawable, etc. Each sub-type implements a specific function. And GifDrawable is also a sub-type in the Drawable type, which is used to implement the display of Gif pictures. It contains various information of the Gif. After converting the target picture into the GifDrawable type, the size of the target picture can be obtained through the Gif decoding library. This size specifically includes the length and width of the target picture.

[0111] Step 208: Determine the size of the first control.

[0112] Among them, the first control is a control that implements one or more functions in the application program. Taking the application program as a browser as an example, the first control can be a control that implements the search in the browser or the browser settings function in the browser, or it can be a control that implements other functions, which will not be elaborated here.

[0113] Determining the size of the first control refers to the size of the application program displayed on the user's device. Since the display area sizes of different devices are different, the size of the first control displayed on the user's device will also change with the display area size of the device, that is, the display area sizes of different devices result in different actual displayed sizes of the first control.

[0114] For example, the display area of device A is 15 cm wide and 20 cm high; the display area of device B is 30 cm wide and 20 cm high. In the application, 3 controls (including the first control) of the same size and adjacent to each other are set horizontally, and the length of the control fills the height of the device display area. Therefore, the size of the first control in device A is 5 cm wide and 20 cm high, and the size of the first control in device B is 10 cm wide and 20 cm high. It should be noted that only an actual example is given here, and the size of the first control can also be obtained by other means, which will not be elaborated here. Also, in this embodiment, the steps do not need to be executed in the chronological order. For example, for steps 207 and 208, step 208 can be executed before step 207 or simultaneously with step 207, which is not limited here.

[0115] Step 209: Take the first length as the second length.

[0116] Specifically, the linkage between the target picture and the first control means covering a control on the first control that can play the dynamic effect of the target picture, so that the target picture is displayed in the first control. Here, the control that can play the dynamic effect of the target picture is the second control. The target picture can fill the entire second control, that is, the size of the second space determines the size of the target picture. Therefore, after obtaining the size of the target picture and the size of the first control from steps 207 and 208 respectively, the size of the second control and the size of the target picture can be adjusted according to the size of the target picture and the size of the second control.

[0117] Among them, the size of the target picture includes the picture length and picture width of the target picture, and the size of the first control includes the first length and first width of the first control. The adjustment method can be taking the height of the first control as the height of the second control, or taking the width of the first control as the width of the second control.

[0118] Step 210: Calculate the first ratio of the first length to the picture length.

[0119] Among them, after determining the height (second length) of the second control in step 209, the ratio of the height of the first control to the height of the target picture can be calculated, and the width of the second control can be obtained by multiplying this ratio by the width of the target picture.

[0120] Step 211: Determine the second width according to the first ratio and the picture width.

[0121] Specifically, it can be according to the formula: gifViewHeight = viewHeight; gitViewWidth =

[0122] gifWidthththh = view / gifHeight; where viewHeight is the first length of the first control, gifViewHeight is the second length, gifWidth is the image width of the target image, and gitViewWidth is the second width.

[0123] Step 212: Adjust the size of the second control and the size of the target image according to the second length and the second width.

[0124] After calculating the second length and the second width, adjust the second control and the target image according to the second length and the second width.

[0125] Step 213: Load the adjusted target image into the adjusted second control.

[0126] Among them, after adjusting the target image and the second control, load the adjusted target image into the adjusted second control, so that the adjusted target image plays in the adjusted second control. Since the second control covers the first control and has a linkage effect, the adjusted target image can be displayed on the first control.

[0127] As can be seen from the above, the embodiment of the present application determines the size of the target image, where the target image is a dynamic image; determines the size of the first control, where the first control is used to display the target image; adjusts the size of the second control and the size of the target image according to the size of the target image and the size of the first control, where the second control covers the first control and is used to play the dynamic effect of the adjusted target image; loads the adjusted target image into the adjusted second control so that the adjusted target image is displayed on the first control. It can avoid the content of the image being compressed and improve the image quality when the image is displayed. And, match the target image from the database according to the download address information to avoid wasting user traffic.

[0128] In some embodiments, taking the application as a browser, the first control is a search box in the browser as Figure 3a shown, the dynamic effect of the target image is as Figure 3b shown, where the target image includes the two characters "Search", and the character "Suo" will move to the right and enlarge at the same time, and then move to the left and shrink back to the initial state.

[0129] When receiving the opening instruction for the user to open the browser, since the browser needs to pass through Figure 3bThe target image shown is displayed in the search box, so the target image needs to be obtained. First, check whether there is an image named after the url information or the processed name in the database according to the url information of the target image. If it exists, directly obtain the target image from the database. If it does not exist, directly download the target image according to the url information. After obtaining the target image, it is also necessary to verify the image type of the target image to determine whether the target image conforms to the protocol specification of the dynamic image format. Taking the image type expected to be displayed by the application as the Gif type as an example, determine whether the target image ends with.gif. If not, clear the obtained target image; if so, convert the target image into the GifDrawable type, and the size of the target image can be obtained by parsing the target image through the Gif decoding library. For example, the length of the target image is 10 cm and the width is 5 cm, and determine the actual size of the first control on the user device. For example: the display area of the user device is 15 cm wide and 20 cm high, and there are 3 controls with the same size and adjacent to each other horizontally (including the first control) in the application, and the length of the control fills the height of the device display area. Therefore, the size of the first control on the user device is 5 cm wide and 20 cm high. Take the height (the first length) of the first control, 20 cm, as the height (the second length) of the second control. Calculate the first ratio of the first length of 20 cm to the length of the image of 10 cm, and the first ratio is 2 cm. Then multiply the first ratio by the width of the image to get the second width of 10 cm. Then, adjust the size of the second control for playing the dynamic effect of the target image and the size of the target image according to the second length of 20 cm and the second width of 10 cm. Finally, the adjusted target image is loaded into the adjusted second control to obtain as Figure 3c the effect diagram shown.

[0130] To facilitate better implementation of the image display method provided by the embodiments of the present application, in one embodiment, an image display device is also provided. The meanings of the nouns are the same as those in the above image display method, and the specific implementation details can be referred to the description in the method embodiments.

[0131] In some embodiments, an image display device is also provided, as Figure 4 and Figure 5 shown, the image display device may include: a first determination unit 401, a second determination unit 402, an adjustment unit 403, and a loading unit 404.

[0132] The first determination unit 401 is used to determine the size of the target image, and the target image is a dynamic image;

[0133] The second determination unit 402 is used to determine the size of the first control, and the first control is used to display the target image;

[0134] An adjustment unit 403, configured to adjust the size of the second control and the size of the target picture according to the size of the target picture and the size of the first control, wherein the second control covers the first control and is used to play the dynamic effect of the adjusted target picture;

[0135] A loading unit 404, configured to load the adjusted target picture into the adjusted second control, so that the adjusted target picture is displayed on the first control.

[0136] In one embodiment, the adjustment unit 403 may include:

[0137] A calculation subunit 4031, configured to use the first length as the second length and calculate a first ratio of the first length to the picture length;

[0138] A determination subunit 4032, configured to determine a second width according to the first ratio and the picture width;

[0139] An adjustment subunit 4033, configured to adjust the size of the second control and the size of the target picture according to the second length and the second width.

[0140] In one embodiment, the picture display device may include:

[0141] A first acquisition unit 405, configured to acquire the download address information of the target picture;

[0142] A matching unit 406, configured to match whether the target picture exists in the database according to the download address information, and obtain a matching result;

[0143] A second acquisition unit 407, configured to acquire the target picture based on the download address information and the matching result.

[0144] In one embodiment, the second acquisition unit 407 may be configured to, if the matching result is that the target picture exists in the database, acquire the target picture from the database.

[0145] In one embodiment, the second acquisition unit 407 may be configured to, if the matching result is that the target picture does not exist in the database, acquire the target picture according to the download address information.

[0146] In one embodiment, the picture display device may include:

[0147] A comparison unit 408, configured to compare the picture type of the target picture with a preset picture type;

[0148] A clearing unit 409, configured to clear the obtained target picture if the picture type of the target picture is different from a preset picture type.

[0149] As can be seen from the above, in the picture display method according to the embodiment of the present application, a first determination unit 401 determines the size of a target picture; a second determination unit 402 determines the size of a first control; an adjustment unit 403 adjusts the size of a second control and the size of the target picture according to the size of the target picture and the size of the first control, where the second control covers the first control and is configured to play a dynamic effect of the adjusted target picture; a loading unit 404 loads the adjusted target picture into the adjusted second control, so that the adjusted target picture is displayed on the first control. This can avoid compression of the content of the picture and improve the picture quality during picture display.

[0150] Reference Figure 6 , in addition, an embodiment of the present invention further provides a terminal, as Figure 6 shown, the terminal may include a radio frequency (RF) circuit 501, a memory 502 including one or more computer-readable storage media, an input unit 503, a display unit 504, a sensor 505, an audio circuit 506, a wireless fidelity (WiFi) module 507, a processor 508 including one or more processing cores, and a power supply 509 and other components. Those skilled in the art can understand that Figure 6 the terminal structure shown in

[0151] The RF circuit 501 can be used for receiving and transmitting information or signals during a call. Specifically, after receiving the downlink information from the base station, it is handed over to one or more processors 508 for processing. Additionally, data related to the uplink is sent to the base station. Generally, the RF circuit 501 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, etc. In addition, the RF circuit 501 can also communicate with the network and other devices via wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0152] The memory 502 can be used to store software programs and modules. The processor 508 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, applications required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the terminal (such as audio data, a phone book, etc.). In addition, the memory 502 can include high-speed random access memory and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. Correspondingly, the memory 502 can also include a memory controller to provide access to the memory 502 for the processor 508 and the input unit 503.

[0153] The input unit 503 can be used to receive input numerical or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Specifically, in a specific embodiment, the input unit 503 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display screen or a touchpad, can collect touch operations of a user thereon or nearby (such as operations of the user using any suitable object or accessory such as a finger or a stylus on or near the touch-sensitive surface), and drive corresponding connection devices according to a preset program. Optionally, the touch-sensitive surface may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch orientation of the user, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 508, and can receive and execute commands sent by the processor 508. In addition, various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch-sensitive surface. In addition to the touch-sensitive surface, the input unit 503 may further include other input devices. Specifically, the other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, etc.

[0154] The display unit 504 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal, and these graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. The display unit 504 may include a display panel. Optionally, the display panel may be configured in forms such as a liquid crystal display (LCD) or an organic light-emitting diode (OLED). Further, the touch-sensitive surface may cover the display panel. After the touch-sensitive surface detects a touch operation thereon or nearby, it is transmitted to the processor 508 to determine the type of touch event. Subsequently, the processor 508 provides corresponding visual output on the display panel according to the type of touch event. Although in Figure 6 it, the touch-sensitive surface and the display panel are implemented as two independent components to achieve input and input functions, but in some embodiments, the touch-sensitive surface and the display panel can be integrated to achieve input and output functions.

[0155] The terminal may further include at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor can turn off the display panel and / or the backlight when the terminal is moved to the ear. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of the acceleration in all directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity, and can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. As for other sensors that the terminal may also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be elaborated here.

[0156] The audio circuit 506, the speaker, and the microphone can provide an audio interface between the user and the terminal. The audio circuit 506 can transmit the electrical signal converted from the received audio data to the speaker, and the speaker converts it into a sound signal for output. On the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 506 and then converted into audio data. After the audio data is output and processed by the processor 508, it is sent to another terminal, for example, through the RF circuit 501, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earphone jack to provide communication between the peripheral earphone and the terminal.

[0157] WiFi belongs to short - range wireless transmission technology. The terminal can help users send and receive emails, browse the web, and access streaming media through the WiFi module 507. It provides users with wireless broadband Internet access. Although Figure 6 the WiFi module 507 is shown, it can be understood that it does not belong to the essential components of the terminal and can be omitted completely according to needs without changing the essence of the invention.

[0158] The processor 508 is the control center of the terminal. It connects various parts of the entire mobile phone using various interfaces and lines. By running or executing the software programs and / or modules stored in the memory 502, and by calling the data stored in the memory 502, it executes various functions of the terminal and processes data, thereby performing an overall detection of the mobile phone. Optionally, the processor 508 may include one or more processing cores. Preferably, the processor 508 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above - mentioned modem processor may not be integrated into the processor 508 either.

[0159] The terminal further includes a power source 509 (such as a battery) for supplying power to each component. Preferably, the power source can be logically connected to the processor 508 through a power management system, so as to manage functions such as charging, discharging, and power consumption management through the power management system. The power source 509 may further include any components such as one or more DC or AC power sources, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0160] Although not shown, the terminal may further include a camera, a Bluetooth module, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 508 in the terminal will load the executable files corresponding to the processes of one or more application programs into the memory 502 according to the following instructions, and the processor 508 will run the application programs stored in the memory 502 to implement various functions:

[0161] Determine the size of the target picture; determine the size of the first control; adjust the size of the second control and the size of the target picture according to the size of the target picture and the size of the first control, wherein the second control covers the first control and is used to play the dynamic effect of the adjusted target picture; load the adjusted target picture into the adjusted second control so that the adjusted target picture is displayed on the first control.

[0162] In some embodiments, the processor 508 may further be used to: use the first length as the second length; calculate the first ratio of the first length to the picture length; determine the second width according to the first ratio and the picture width; adjust the size of the second control and the size of the target picture according to the second length and the second width.

[0163] In some embodiments, the processor 508 may further be used to: obtain the download address information of the target picture; match whether the target picture exists in the database according to the download address information to obtain a matching result; obtain the target picture based on the download address information and the matching result.

[0164] In some embodiments, the processor 508 may further be used to: if the matching result is that the target picture exists in the database, obtain the target picture from the database.

[0165] In some embodiments, the processor 508 may further be used to: if the matching result is that the target picture does not exist in the database, obtain the target picture according to the download address information.

[0166] In some embodiments, the processor 508 may further be configured to: compare the picture type of the target picture with a preset picture type; and if the picture type of the target picture is different from the preset picture type, clear the obtained target picture.

[0167] As can be seen from the above, in the terminal provided in this embodiment, first, the size of the target picture is determined, and the target picture is a dynamic picture; the size of the first control for displaying the target picture is determined; according to the size of the target picture and the size of the first control, the size of the second control and the size of the target picture are adjusted, where the second control covers the first control and is used to play the dynamic effect of the adjusted target picture; the adjusted target picture is loaded into the adjusted second control so that the adjusted target picture is displayed on the first control. This can avoid the content of the picture being compressed and improve the picture quality when the picture is displayed.

[0168] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and this program can be stored in a computer-readable storage medium. The storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), a magnetic disk or an optical disc, etc.

[0169] In the above embodiments, the descriptions of the various embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0170] The above has introduced in detail a picture display method, system, storage medium and terminal provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the technical solution and its core idea of the present application; those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for displaying pictures, characterized in that, including: When the application is launched for the first time or the operator updates the application, obtain and determine the size of the target picture, including: the target picture is a dynamic picture; convert the target picture into a Drawable type, and obtain the size of the target picture through a decoding library; Determine the size of the first control, where the first control is used to display the target picture, and the first control is a control for implementing functions in the application; where the size of the target picture includes the picture length and picture width of the target picture, and the size of the first control includes the first length and first width of the first control; According to the size of the target picture and the size of the first control, adjust the size of the second control and the size of the target picture, including: use the first length as the second length; calculate the first ratio of the first length to the picture length; determine the second width according to the first ratio and the picture width; adjust the size of the second control and the size of the target picture according to the second length and the second width; where the second control is a control for playing the dynamic effect of the target picture, and the second control covers the first control and is used to play the dynamic effect of the adjusted target picture; Load the adjusted target picture into the adjusted second control so that the adjusted target picture is displayed on the first control.

2. The picture display method according to claim 1, wherein Before determining the size of the target picture, it further includes: Obtain the download address information of the target picture; Match whether the target picture exists in the database according to the download address information to obtain a matching result; Obtain the target picture based on the download address information and the matching result.

3. The picture display method according to claim 2, wherein The obtaining the target picture based on the download address information and the matching result includes: If the matching result is that the target picture exists in the database, obtain the target picture from the database.

4. The picture display method according to claim 2, wherein The obtaining the target picture based on the download address information and the matching result includes: If the matching result is that the target picture does not exist in the database, obtain the target picture according to the download address information.

5. The picture display method according to claim 2, characterized in that, After obtaining the target picture based on the download address information and the matching result, it further includes: Compare the picture type of the target picture with a preset picture type; If the picture type of the target picture is different from the preset picture type, clear the obtained target picture.

6. A picture display device, characterized in that, including: The first determination unit is used to obtain and determine the size of the target picture when the application is launched for the first time or the operator updates the application, including: the target picture is a dynamic picture; convert the target picture into a Drawable type, and obtain the size of the target picture through a decoding library; The second determination unit is used to determine the size of the first control, where the first control is used to display the target picture, and the first control is a control for implementing functions in the application; where the size of the target picture includes the picture length and picture width of the target picture, and the size of the first control includes the first length and first width of the first control; An adjustment unit, configured to adjust the size of the second control and the size of the target picture according to the size of the target picture and the size of the first control, where the second control is a control for playing the dynamic effect of the target picture, and the second control covers the first control for playing the dynamic effect of the adjusted target picture; A loading unit, configured to load the adjusted target picture into the adjusted second control, so that the adjusted target picture is displayed on the first control; Wherein, the adjustment unit includes: A calculation subunit, configured to use the first length as the second length and calculate a first ratio of the first length to the picture length; A determination subunit, configured to determine a second width according to the first ratio and the picture width; An adjustment subunit, configured to adjust the size of the second control and the size of the target picture according to the second length and the second width.

7. The picture display device according to claim 6, wherein The picture display device further includes: A first acquisition unit, configured to acquire the download address information of the target picture; A matching unit, configured to match whether the target picture exists in the database according to the download address information to obtain a matching result; A second acquisition unit, configured to acquire the target picture based on the download address information and the matching result.

8. The picture display device according to claim 7, wherein The picture display device further includes: A comparison unit, configured to compare the picture type of the target picture with a preset picture type; A clearing unit, configured to clear the acquired target picture if the picture type of the target picture is different from the preset picture type.

9. A storage medium, characterized in that, The storage medium stores instructions, and when the instructions are executed by a processor, the picture display method according to any one of claims 1 to 5 is implemented.

10. A terminal, characterized in that, It includes a memory, a processor, and a computer program stored on the storage and executable on the processor, wherein the processor executes the steps in the picture display method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Large font implementation method and apparatus, and intelligent terminal

    CN105389083A

  • Control display method and apparatus

    CN106484407A

  • Image information processing method and device and storage medium

    CN109670427A

  • User interface display method and device, computer device and storage medium

    CN109766157A