Disclosure of Invention
Embodiments of the present disclosure propose methods and apparatuses for processing information.
In a first aspect, an embodiment of the present disclosure provides a method for processing information, the method including: responding to the trigger operation of a user on the thumbnail in the thumbnail list, and determining the size and the position of the thumbnail on a screen, wherein the thumbnail is associated with an original picture in advance; acquiring a first rectangle with the same size as the thumbnail; determining parameter information for adjustment of the position and magnification of the first rectangle based on the target size, the target position, and the size and position on the screen of the thumbnail; placing a first rectangle at the position of the thumbnail on a screen, and mapping the original picture to the first rectangle; based on the parameter information, the position and magnification of the first rectangle are adjusted until the position of the first rectangle on the screen is adjusted to a target position, and the size of the first rectangle is adjusted to a target size.
In some embodiments, obtaining a first rectangle having the same dimensions as the thumbnail includes: taking a pre-generated rectangle with the same height-width ratio as the original picture; performing a scaling operation on the rectangle based on the size of the thumbnail to adjust the size of the rectangle to the size of the thumbnail; and determining the rectangle after the scaling operation as a first rectangle.
In some embodiments, the parameter information includes all of: adjusting times, interval duration, a first step size and a second step size, wherein the first step size is a step size related to the magnification of the first rectangle, and the second step size is a step size related to the position of the first rectangle on the screen; and determining parameter information for adjustment of the position and magnification of the first rectangle based on the target size, the target position, and the size and position on the screen of the thumbnail, including: acquiring preset total time and interval time from the local; determining the ratio of the total duration to the interval duration as the adjustment times; determining a total magnification based on the size of the thumbnail and the target size, and determining a first step size based on the adjustment times and the total magnification; the total movement distance is determined based on the position of the thumbnail on the screen and the target position, and the second step size is determined based on the total movement distance and the number of adjustments.
In some embodiments, adjusting the position and magnification of the first rectangle based on the parameter information until the position of the first rectangle on the screen is adjusted to the target position and the size of the first rectangle is adjusted to the target size includes: the following adjustment operations are performed: adjusting the magnification of the first rectangle based on the first step length; based on the second step length, adjusting the position of the first rectangle on the screen; performing incremental operation on the execution times of the adjustment operation; determining whether the increased execution times are less than the adjustment times; if the execution times after the increment is not less than the adjustment times, finishing the adjustment operation; and if the increased execution times are less than the adjustment times, continuing to execute the adjustment operation after the interval time is long.
In some embodiments, after adjusting the position of the first rectangle on the screen to the target position and adjusting the size of the first rectangle to the target size, the method further comprises: the original picture is remapped onto the first rectangle.
In some embodiments, after adjusting the position of the first rectangle on the screen to the target position and adjusting the size of the first rectangle to the target size, the method further comprises: in response to a user's zoom-in operation with respect to the first rectangle, the magnification of the first rectangle is adjusted based on the zoom-in operation.
In some embodiments, after adjusting the magnification of the first rectangle based on the magnification operation in response to the user's magnification operation with respect to the first rectangle, the method further comprises: determining whether at least one of a height and a width of the original picture is greater than a respective threshold; if so, partitioning an image area presented on a screen based on the preset image block size; analyzing each divided image block, determining the image content corresponding to the image block in the original picture, and drawing the image content at the position of the image block on the screen.
In a second aspect, an embodiment of the present disclosure provides an apparatus for processing information, the apparatus including: a first determination unit configured to determine a size and a position on a screen of a thumbnail in response to a user's trigger operation on the thumbnail in a thumbnail list, wherein the thumbnail is associated with an original picture in advance; an acquisition unit configured to acquire a first rectangle having the same size as the thumbnail; a second determination unit configured to determine parameter information for adjustment of a position and a magnification of the first rectangle based on the target size, the target position, and the size and the position on the screen of the thumbnail; a mapping unit configured to place a first rectangle at a position on a screen where the thumbnail is located, and map the original picture onto the first rectangle; an adjusting unit configured to adjust a position and a magnification of the first rectangle until the position of the first rectangle on the screen is adjusted to a target position and a size of the first rectangle is adjusted to a target size based on the parameter information.
In some embodiments, the obtaining unit is further configured to: acquiring a pre-generated rectangle with the same height-width ratio as the original picture; performing a scaling operation on the rectangle based on the size of the thumbnail to adjust the size of the rectangle to the size of the thumbnail; and determining the rectangle after the scaling operation as a first rectangle.
In some embodiments, the parameter information includes all of: adjusting times, interval duration, a first step size and a second step size, wherein the first step size is a step size related to the magnification of the first rectangle, and the second step size is a step size related to the position of the first rectangle on the screen; and the second determination unit is further configured to: acquiring preset total time and interval time from the local; determining the ratio of the total duration to the interval duration as the adjustment times; determining a total magnification based on the size of the thumbnail and the target size, and determining a first step size based on the adjustment times and the total magnification; the total movement distance is determined based on the position of the thumbnail on the screen and the target position, and the second step size is determined based on the total movement distance and the number of adjustments.
In some embodiments, the adjustment unit is further configured to: the following adjustment operations are performed: adjusting the magnification of the first rectangle based on the first step length; based on the second step length, adjusting the position of the first rectangle on the screen; performing incremental operation on the execution times of the adjustment operation; determining whether the increased execution times are less than the adjustment times; if the execution times after the increment is not less than the adjustment times, finishing the adjustment operation; and if the increased execution times are less than the adjustment times, continuing to execute the adjustment operation after the interval time is long.
In some embodiments, the above apparatus further comprises: a first mapping unit configured to remap the original picture onto the first rectangle after the adjusting unit adjusts the position of the first rectangle on the screen to the target position and adjusts the size of the first rectangle to the target size.
In some embodiments, the above apparatus further comprises: a first adjusting unit configured to adjust a magnification of the first rectangle based on a magnification operation in response to a magnification operation of the first rectangle by a user after the adjusting unit adjusts the position of the first rectangle on the screen to a target position and adjusts the size of the first rectangle to a target size.
In some embodiments, the above apparatus further comprises: a third determining unit configured to determine whether at least one of a height and a width of the original picture is greater than a corresponding threshold value after the first adjusting unit adjusts the magnification of the first rectangle based on the magnification operation in response to the magnification operation of the user with respect to the first rectangle; a blocking unit configured to block an image area presented on a screen based on a preset image block size if the third determining unit determines that at least one of the height and the width of the original picture is greater than a corresponding threshold; and the drawing unit is configured to analyze each divided image block, determine the image content corresponding to the image block in the original picture, and draw the image content at the position of the image block on the screen.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon; when executed by the one or more processors, cause the one or more processors to implement a method as described in any implementation of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, which when executed by a processor implements the method as described in any of the implementations of the first aspect.
The above-mentioned embodiments of the present disclosure provide a method and apparatus for processing information, by determining the size and position on the screen of a thumbnail in a thumbnail list in response to a user's trigger operation on the thumbnail, wherein the thumbnail associates an original picture in advance, acquires a first rectangle having the same size as the thumbnail, and then determines parameter information for adjustment of the position and magnification of the first rectangle based on the target size, the target position, and the size and position on the screen of the thumbnail, then, a first rectangle is placed where the thumbnail is located on the screen, and the original picture is mapped onto the first rectangle, so as to adjust the position and magnification of the first rectangle based on the parameter information until the position of the first rectangle on the screen is adjusted to the target position and the size of the first rectangle is adjusted to the target size. The embodiment of the present disclosure may implement smooth motion pictures through the use of the first rectangle, and may smoothly transition the picture from the thumbnail in the list to the display of the entire original picture.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the disclosed method for processing information or apparatus for processing information may be applied.
As shown in fig. 1, the system architecture 100 may include a terminal device 101. A client application for browsing pictures may be installed on the terminal device 101.
The terminal apparatus 101 may be hardware or software. When the terminal device 101 is hardware, it may be various electronic devices with a display screen, including but not limited to a smart phone, a tablet computer, and the like. When the terminal apparatus 101 is software, it can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The user may view the list of thumbnails in the client application described above. When a user wants to view a picture with a large size corresponding to a certain thumbnail in the thumbnail list, a trigger operation (e.g., a click operation) may be performed on the thumbnail, and the terminal device 101 may perform processing such as analysis on the thumbnail in response to the trigger operation.
It should be noted that the method for processing information provided by some embodiments of the present disclosure is generally performed by the terminal device 101, and accordingly, the apparatus for processing information is generally disposed in the terminal device 101.
It should be understood that the number of terminal devices in fig. 1 is merely illustrative. There may be any number of terminal devices, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for processing information in accordance with the present disclosure is shown. The flow 200 of the method for processing information comprises the following steps:
step 201, responding to the trigger operation of the user on the thumbnail in the thumbnail list, determining the size and the position of the thumbnail on the screen.
In the present embodiment, an execution subject of the method for processing information (e.g., terminal apparatus 101 shown in fig. 1) can determine the size and position on the screen of a thumbnail in a thumbnail list in response to a user's trigger operation on the thumbnail. The trigger operation may include, but is not limited to, a click operation, a double-click operation, a drag operation, and the like.
It should be noted that the execution subject may locally install a client application for browsing pictures. The thumbnail list may be a list attributed to the client application. The execution main body may locally store size information of the thumbnail, and thus the execution main body may locally acquire the size information and determine the size of the thumbnail based on the size information. The thumbnail may be associated with the original picture in advance. The thumbnail may be a thumbnail obtained by compressing the original picture. It is noted that the dimensions in this embodiment may include height and width. The height and width may be in pixels.
Further, the position of the thumbnail on the screen may have been calculated before, and thus the execution main body may locally acquire position information corresponding to the thumbnail and determine the position of the thumbnail currently on the screen based on the position information.
At step 202, a first rectangle having the same size as the thumbnail is obtained.
In this embodiment, the execution main body may acquire a first rectangle having the same size as the thumbnail. Here, the first rectangle may be generated in advance.
In some optional implementations of the embodiment, the executing body may obtain a pre-generated rectangle having the same aspect ratio as the original picture. The execution body may then perform a scaling operation on the acquired rectangle based on the size of the thumbnail to adjust the size of the rectangle to the size of the thumbnail. The execution body may then determine the rectangle after the scaling operation as a first rectangle.
Step 203, determining parameter information for adjustment of the position and magnification of the first rectangle based on the target size, the target position, and the size and position on the screen of the thumbnail.
In the present embodiment, the execution main body may determine parameter information for adjustment of the position and magnification of the first rectangle based on the target size, the target position, and the size and position on the screen of the thumbnail. Wherein the target size is larger than the size of the thumbnail. The target position is typically a centered position on the screen. The target size and target position are generally predetermined. It should be understood that the target size and target position may be set according to actual needs, and are not particularly limited herein.
The magnification may be an attribute that the first rectangle has. The first rectangle may become larger as the magnification increases. The parameter information may include, for example, all of the following: the number of times of adjustment, interval duration, first step length and second step length. Wherein the first step size may be a step size related to a magnification of the first rectangle. The second step size may be a step size related to a position of the first rectangle on the screen. It is noted that the second step size may include step sizes corresponding to the X-axis and the Y-axis, respectively.
As an example, the execution body described above may determine the parameter information for the adjustment of the position and magnification of the first rectangle in the following manner:
first, the execution main body may locally acquire a preset total duration (e.g., 250 msec) and an interval duration (e.g., 15 msec). It should be understood that the total duration and the interval duration can be set according to actual needs, and are not particularly limited herein.
Then, the execution subject may determine a ratio of the total time length to the interval time length as the number of times of adjustment.
Then, the execution main body may determine a total magnification based on the size of the thumbnail and the target size, and determine the first step size based on the number of times of adjustment and the total magnification. For example, assume that the magnification is expressed in percent. If the size of the thumbnail is 20 × 20 and the target size is 200 × 200, it can be seen that the target size is 10 times the size of the thumbnail. Where the values to the left of the symbol "x" may represent the width and the values to the right may represent the height. Thus, the total magnification may be 1000%. Assuming that the number of adjustments is 10, the first step length may be a ratio of 1000% to 10, i.e., 100%.
Finally, the execution body may determine a total moving distance based on the position of the thumbnail on the screen and the target position, and determine a second step size based on the total moving distance and the number of adjustments. Here, the total moving distance may include total moving distances corresponding to the X-axis and the Y-axis, respectively. The total moving distance can be calculated based on the coordinates of the center point of the above two positions. In addition, the total moving distance may be a positive number or a negative number, and is not particularly limited herein. It should be noted that, the step size corresponding to the X axis in the second step size may be a ratio of the total moving distance corresponding to the X axis to the number of times of adjustment. The step corresponding to the Y axis in the second step may be a ratio of the total moving distance corresponding to the Y axis to the above-mentioned number of adjustments.
For example, assume that the center point coordinate a of the position of the above thumbnail on the screen is (100, 400), and the center point coordinate B of the target position is (250 ). Here, the left numerical value in the coordinates may be an X coordinate value, and the right numerical value may be a Y coordinate value. If the thumbnail is moved from the position to the target position, the execution body may calculate a difference 150 between the center point coordinate B and the X coordinate value in the center point coordinate a, and determine 150 as the total movement distance corresponding to the X axis. The executing body may further calculate a difference value-150 between the center point coordinate B and the Y coordinate value in the center point coordinate a, and determine-150 as the total moving distance corresponding to the Y axis. Assuming that the number of times of adjustment is 10, the executing body may calculate a ratio 15 of the total moving distances 150 and 10 corresponding to the X axis, and determine 15 as a step corresponding to the X axis in the second step. The execution body may further calculate a ratio-15 of total moving distances-150 and 10 corresponding to the Y-axis, and determine-15 as a step corresponding to the Y-axis in the second step.
In some optional implementations of the present embodiment, the number of times of adjustment and the interval duration may be preset. The execution main body can locally acquire the preset adjustment times and the interval duration. The values of other parameters in the parameter information may be calculated using the method described above.
And step 204, placing the first rectangle at the position of the thumbnail on the screen, and mapping the original picture associated with the thumbnail to the first rectangle.
In this embodiment, the execution main body may place a first rectangle at a position on the screen where the thumbnail is located, and map an original picture associated with the thumbnail onto the first rectangle. Here, the executing entity may map the original picture onto the first rectangle by texture mapping, for example. Texture Mapping (Texture Mapping), also known as Texture Mapping, is a process of Mapping texels in Texture space to pixels in screen space. Since texture mapping is a well-known technique that is currently widely studied and applied, it is not described herein in detail.
And step 205, based on the parameter information, adjusting the position and magnification of the first rectangle until the position of the first rectangle on the screen is adjusted to the target position and the size of the first rectangle is adjusted to the target size.
In the present embodiment, the execution body described above may adjust the position and magnification of the first rectangle based on the parameter information determined in step 204 until the position of the first rectangle on the screen is adjusted to the target position and the size of the first rectangle is adjusted to the target size.
As an example, the execution body described above may perform the following adjustment operations: adjusting the magnification of the first rectangle based on the first step length; adjusting the position of the first rectangle on the screen based on the second step length; performing incremental operation on the execution times of the adjustment operation; determining whether the increased execution times are less than the adjustment times; if the execution times after the increment is not less than the adjustment times, finishing the adjustment operation; and if the increased execution times are less than the adjustment times, continuing to execute the adjustment operation after the interval time length.
Here, the executing body may increase the magnification of the first rectangle by the first step length each time the adjusting operation is performed, and increase the X coordinate value and the Y coordinate value of each pixel point in the first rectangle in the coordinates on the screen by the corresponding step length in the second step length respectively. Note that the initial value of the number of times of execution of the above-described adjustment operation may be 0. The execution main body may increment the execution count by 1 each time the execution count is incremented.
It should be noted that, because the original picture is mapped onto the first rectangle, when the magnification and the position of the first rectangle on the screen are adjusted, the user can also see that the size and the position of the picture displayed on the screen are changed accordingly.
The method provided by the above embodiment of the present disclosure determines the size and the position on the screen of the thumbnail by responding to a trigger operation of a user on the thumbnail in the thumbnail list, wherein the thumbnail associates an original picture in advance, acquires a first rectangle having the same size as the thumbnail, and then determines parameter information for adjustment of the position and the magnification of the first rectangle based on the target size, the target position, the size of the thumbnail and the position on the screen, and then places the first rectangle at the position on the screen where the thumbnail is located, and maps the original picture onto the first rectangle, so as to adjust the position and the magnification of the first rectangle based on the parameter information until the position on the screen of the first rectangle is adjusted to the target position, and adjust the size of the first rectangle to the target size. The above embodiments of the present disclosure may implement smooth cut-through animation by utilizing the first rectangle, for example, by adjusting the position and magnification of the first rectangle multiple times, so that the picture may be smoothly transitioned from the thumbnail in the list to the display of the entire original picture.
With further reference to FIG. 3, a flow 300 of yet another embodiment of a method for processing information is shown. The flow 300 of the method for processing information includes the steps of:
step 301, in response to a user's trigger operation on a thumbnail in the thumbnail list, determining the size and the position of the thumbnail on the screen.
In step 302, a first rectangle having the same size as the thumbnail is obtained.
Step 303, determining parameter information for adjustment of the position and magnification of the first rectangle based on the target size, the target position, and the size and position on the screen of the thumbnail.
Step 304, a first rectangle is placed at the position of the thumbnail on the screen, and the original picture associated with the thumbnail is mapped to the first rectangle.
And 305, based on the parameter information, adjusting the position and magnification of the first rectangle until the position of the first rectangle on the screen is adjusted to the target position and the size of the first rectangle is adjusted to the target size.
In the present embodiment, for the explanation of the steps 301-305, refer to the related explanation of the step 201-205 in the embodiment shown in fig. 2, and will not be described herein again.
And step 306, responding to the amplifying operation related to the first rectangle by the user, and adjusting the amplifying times of the first rectangle based on the amplifying operation.
In the present embodiment, the execution subject of the method for processing information (e.g., the terminal device 101 shown in fig. 1) may adjust the magnification of the first rectangle based on the magnification operation in response to the user's magnification operation with respect to the first rectangle after executing step 305.
Here, the enlarging operation may include, for example, a double-click operation, a set gesture operation, and the like performed by the user in the area where the first rectangle is located. The set gesture may be, for example, a swipe of two fingers in different directions. It should be noted that the double-click operation may be associated with a magnification in advance, for example. If the execution main body detects a double-click operation performed by the user in the area where the first rectangle is located, the execution main body may adjust the magnification of the first rectangle based on the magnification associated with the double-click operation to magnify the first rectangle. If the execution main body detects a setting gesture operation performed by a user in an area where the first rectangle is located, the execution main body may determine a magnification factor to be amplified based on, for example, a direction in which a finger slides when the user performs the setting gesture operation, the number of pixels stroked in different directions, and the like, and adjust the magnification factor of the first rectangle based on the determined magnification factor.
Step 307, it is determined whether at least one of the height and the width of the original picture is greater than a respective threshold.
In this embodiment, after the execution of step 306, the definition of the picture displayed on the screen is generally lower. To improve the clarity of the picture presented to the user, the executing entity may perform further processing, such as reloading the original picture. Since loading an oversized picture occupies more memory, the execution subject may determine the operation to be executed subsequently based on the size of the original picture. Here, the execution main body may determine whether at least one of a height and a width of the original picture is greater than a corresponding threshold. If at least one of the height and the width of the original picture is greater than the corresponding threshold, the executing entity may determine that the original picture is an oversized picture, and the executing entity may execute step 308. If the height and the width of the original picture are not larger than the corresponding threshold values, the execution main body can determine that the original picture is not an oversized picture, and the original picture is directly loaded without occupying too much memory, so that the execution main body can directly load the original picture and draw on a screen.
It should be noted that the threshold values corresponding to the height and the width may be the same threshold value or different threshold values, and the threshold values may be set according to actual needs, and are not specifically limited herein.
In response to determining that at least one of the height and the width of the original picture is greater than the corresponding threshold, an image area presented on the screen is blocked based on a preset image block size, step 308.
In this embodiment, the execution subject may block an image region displayed on a screen based on a preset image block size (e.g., 215 × 215) in response to determining that at least one of a height and a width of the original picture is greater than a corresponding threshold. It should be understood that the size of the image block may be set according to actual needs, and is not limited in particular.
Step 309, analyzing each separated image block, determining the image content corresponding to the image block in the original picture, and drawing the determined image content at the position of the image block on the screen.
In this embodiment, for each image block split in step 308, the executing entity may analyze the image block to determine the image content corresponding to the image block in the original picture. The executing body may draw the image content at a position where the image block is located on the screen. In this way, the execution main body can reduce the memory occupation by loading the image content only in the visible area in a blocking way.
It should be noted that, if the execution body is a terminal device equipped with an Android operating system, the execution body may be generated in advance with a bitmapped region decoder method. A bitmapped region decoder may be used to display a certain rectangular region of a picture. The execution body may call a pre-generated bitmap region decoder method to decode each divided image block, and determine the image content corresponding to the image block in the original picture. The execution body may draw image contents decoded by calling a previously generated bitmap region decoder method to a corresponding position on a screen.
As can be seen from fig. 3, compared with the embodiment corresponding to fig. 2, the flow 300 of the method for processing information in the present embodiment highlights the steps of adjusting the magnification of the first rectangle based on the magnification operation in response to the magnification operation of the user with respect to the first rectangle after adjusting the position of the first rectangle on the screen to the target position and adjusting the size of the first rectangle to the target size, and then performing block loading to display only the image content in the visible area in response to at least one of the height and the width of the original picture with which the thumbnail is associated being greater than the corresponding threshold value. The scheme described by the embodiment can realize the diversity of information processing and improve the definition of pictures presented to users. Moreover, under the condition that at least one of the height and the width of the original picture related to the thumbnail is larger than the corresponding threshold value, only the image content in the visible area is displayed by block loading, and the occupation of the memory can be effectively reduced.
In some optional implementations of the method for processing information provided by the embodiments respectively corresponding to fig. 2 and fig. 3, an execution subject of the method (e.g., the terminal device 101 shown in fig. 1) may remap the original picture onto the first rectangle after adjusting the position of the first rectangle on the screen to the target position and adjusting the size of the first rectangle to the target size. In this way, the clarity of the picture presented to the user may be improved.
In some optional implementations of the method for processing information provided in the embodiments respectively corresponding to fig. 2 and fig. 3, if the trigger operation of the user on the thumbnail in the thumbnail list is a drag operation, the execution main body may acquire an end position coordinate of the drag operation. The execution body may then determine parameter information including all of: a first movement distance, a second movement distance, a first magnification and a second magnification. Wherein the first moving distance may be calculated based on the center point coordinate of the triggered thumbnail and the end position coordinate. The second moving distance may be calculated based on the coordinates of the end position and the coordinates of the center point of the target position. The first moving distance and the second moving distance may each include a moving distance corresponding to an X axis and a moving distance corresponding to a Y axis. The first magnification may be a preset magnification related to the drag operation. The second magnification may be a difference of the total magnification from the first magnification. The total magnification may be calculated based on the size of the triggered thumbnail and the target size. When the execution main body adjusts the position and the magnification of the first rectangle, the execution main body may first adjust the position of the first rectangle on the screen based on the first movement distance to move the first rectangle from the current position to the end position of the drag operation, and increase the magnification of the first rectangle by the first magnification. Then, the execution body may adjust the position of the first rectangle on the screen based on the second movement distance to move the first rectangle from the end position to the target position, and increase the magnification of the first rectangle by the second magnification. It should be noted that, after the execution main body increases the magnification of the first rectangle twice, the size of the first rectangle can be adjusted to the target size.
With further reference to fig. 4, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an apparatus for processing information, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable in various electronic devices.
As shown in fig. 4, the apparatus 400 for processing information of the present embodiment includes: the first determination unit 401 is configured to determine the size and the position on the screen of a thumbnail in response to a user's trigger operation on the thumbnail in a thumbnail list, wherein the thumbnail may be associated with an original picture in advance; the acquisition unit 402 is configured to acquire a first rectangle having the same size as the thumbnail; the second determination unit 403 is configured to determine parameter information for adjustment of the position and magnification of the first rectangle based on the target size, the target position, and the size and position on the screen of the thumbnail; the mapping unit 404 is configured to place a first rectangle where the thumbnail is located on the screen and map the original picture onto the first rectangle; the adjusting unit 405 is configured to adjust the position and magnification of the first rectangle based on the parameter information until the position of the first rectangle on the screen is adjusted to a target position and the size of the first rectangle is adjusted to a target size.
In the present embodiment, in the apparatus for processing information 400: the specific processing of the first determining unit 401, the obtaining unit 402, the second determining unit 403, the mapping unit 404 and the adjusting unit 405 and the technical effects thereof may refer to the related descriptions of step 201, step 202, step 203, step 204 and step 205 in the corresponding embodiment of fig. 2, which are not repeated herein.
In some optional implementations of this embodiment, the obtaining unit 402 may be further configured to: acquiring a pre-generated rectangle with the same height-width ratio as the original picture; performing a scaling operation on the rectangle based on the size of the thumbnail to adjust the size of the rectangle to the size of the thumbnail; and determining the rectangle after the scaling operation as a first rectangle.
In some optional implementations of this embodiment, the parameter information may include all of the following items: adjusting times, interval duration, a first step size and a second step size, wherein the first step size can be a step size related to the magnification of the first rectangle, and the second step size can be a step size related to the position of the first rectangle on the screen; and the second determining unit 403 may be further configured to: acquiring preset total time and interval time from the local; determining the ratio of the total duration to the interval duration as the adjustment times; determining a total magnification based on the size of the thumbnail and the target size, and determining a first step size based on the adjustment times and the total magnification; the total movement distance is determined based on the position of the thumbnail on the screen and the target position, and the second step size is determined based on the total movement distance and the number of adjustments.
In some optional implementations of this embodiment, the adjusting unit 405 may be further configured to: the following adjustment operations are performed: adjusting the magnification of the first rectangle based on the first step length; based on the second step length, adjusting the position of the first rectangle on the screen; performing incremental operation on the execution times of the adjustment operation; determining whether the increased execution times are less than the adjustment times; if the execution times after the increment is not less than the adjustment times, finishing the adjustment operation; and if the increased execution times are less than the adjustment times, continuing to execute the adjustment operation after the interval time length.
In some optional implementations of this embodiment, the apparatus 400 may further include: a first mapping unit (not shown in the figure) configured to remap the original picture onto the first rectangle after the adjusting unit 405 adjusts the position of the first rectangle on the screen to the target position and adjusts the size of the first rectangle to the target size.
In some optional implementations of this embodiment, the apparatus 400 may further include: a first adjusting unit (not shown in the figure) configured to, after the adjusting unit 405 adjusts the position of the first rectangle on the screen to a target position and adjusts the size of the first rectangle to a target size, adjust the magnification of the first rectangle based on the enlarging operation in response to the enlarging operation of the user with respect to the first rectangle.
In some optional implementations of this embodiment, the apparatus 400 may further include: a third determining unit (not shown in the figure) configured to determine whether at least one of a height and a width of the original picture is greater than a corresponding threshold value after the first adjusting unit adjusts the magnification of the first rectangle based on the magnification operation in response to the magnification operation of the user with respect to the first rectangle; a blocking unit (not shown in the figures) configured to block an image area presented on the screen based on a preset image block size if the third determining unit determines that at least one of the height and the width of the original picture is greater than a corresponding threshold; and the drawing unit (not shown in the figure) is configured to analyze each divided image block, determine the image content corresponding to the image block in the original picture, and draw the picture content at the position of the image block on the screen.
The apparatus provided by the above embodiment of the present disclosure determines the size and the position on the screen of a thumbnail in a thumbnail list by responding to a trigger operation of a user on the thumbnail, wherein the thumbnail associates an original picture in advance, acquires a first rectangle having the same size as the thumbnail, and then determines parameter information for adjustment of the position and the magnification of the first rectangle based on a target size, a target position, and the size and the position on the screen of the thumbnail, and then places the first rectangle at the position on the screen of the thumbnail, and maps the original picture onto the first rectangle, so as to adjust the position and the magnification of the first rectangle based on the parameter information until the position on the screen of the first rectangle is adjusted to the target position, and adjust the size of the first rectangle to the target size. The embodiment of the present disclosure may implement smooth motion pictures through the use of the first rectangle, and may smoothly transition the picture from the thumbnail in the list to the display of the entire original picture.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with an electronic device (e.g., terminal device 101 shown in FIG. 1) implementing embodiments of the present disclosure. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
To the I/O interface 505, AN input section 506 including a keyboard, a mouse, and the like, AN output section 507 including a keyboard such as a Cathode Ray Tube (CRT), a liquid crystal display (L CD), and the like, a speaker, and the like, a storage section 508 including a hard disk and the like, and a communication section 509 including a network interface card such as a L AN card, a modem, and the like, the communication section 509 performs communication processing via a network such as the internet, a drive 510 is also connected to the I/O interface 505 as necessary, a removable medium 511 such as a magnetic disk, AN optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The above-described functions defined in the system of the present disclosure are executed when the computer program is executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including AN object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a first determining unit, an obtaining unit, a second determining unit, a mapping unit, and an adjusting unit. Here, the names of the cells do not constitute a limitation on the cell itself in some cases, and for example, the first determination unit may also be described as "a cell that determines the size and position on the screen of a thumbnail in response to a user's trigger operation on a thumbnail in a thumbnail list".
As another aspect, the present disclosure also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to: in response to the triggering operation of a user on the thumbnail in the thumbnail list, determining the size and the position of the thumbnail on a screen, wherein the thumbnail can be associated with an original picture in advance; acquiring a first rectangle with the same size as the thumbnail; determining parameter information for adjustment of a position and a magnification of the first rectangle based on the target size, the target position, and the size and the position on the screen of the thumbnail; placing a first rectangle at the position of the thumbnail on the screen, and mapping the original picture onto the first rectangle; based on the parameter information, the position and magnification of the first rectangle are adjusted until the position of the first rectangle on the screen is adjusted to a target position, and the size of the first rectangle is adjusted to a target size.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept as defined above. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.