CN111352598B - Image scrolling display method and device - Google Patents

Image scrolling display method and device Download PDF

Info

Publication number
CN111352598B
CN111352598B CN201811580051.0A CN201811580051A CN111352598B CN 111352598 B CN111352598 B CN 111352598B CN 201811580051 A CN201811580051 A CN 201811580051A CN 111352598 B CN111352598 B CN 111352598B
Authority
CN
China
Prior art keywords
displayed
image
pixel
preset
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811580051.0A
Other languages
Chinese (zh)
Other versions
CN111352598A (en
Inventor
熊雕
王玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201811580051.0A priority Critical patent/CN111352598B/en
Publication of CN111352598A publication Critical patent/CN111352598A/en
Application granted granted Critical
Publication of CN111352598B publication Critical patent/CN111352598B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros

Abstract

The embodiment of the invention provides an image scrolling display method and device, and relates to the technical field of image display. The method and the device determine the third position coordinate of each pixel to be displayed, then inquire the color change parameter of each pixel to be displayed from a pre-established pixel change index table according to the third position coordinate, and finally update the color of each target pixel according to the pixel change index table. According to the pixel change index table, whether the color of the pixel to be displayed is changed or not is judged through the third position coordinate of each pixel to be displayed, if the color is changed, the color of the pixel to be displayed is updated according to the pixel change index table, namely, the color of the pixel with the changeable color is updated only, so that the refreshing of all pixels in a display area is avoided, the occupancy rate of system resources is reduced, and the refreshing efficiency is improved.

Description

Image scrolling display method and device
Technical Field
The invention relates to the technical field of image display, in particular to an image scrolling display method and device.
Background
In order to improve the dynamic display effect of the character strings and improve the utilization rate of the display screen, the character strings are often required to be displayed on the display screen in a rolling manner. In a method for scroll displaying a character string in the prior art, a buffer area is established, the character string to be scroll displayed is written into the buffer area, and then the character string is read from the buffer area and refreshed into a scroll display area for display.
In the method for displaying the character string in the rolling way, all the pixel points in the display area are updated every time of refreshing, even if the pixel points with unchanged colors need to be refreshed again, and system resources are wasted.
Disclosure of Invention
In view of the above, the present invention provides an image scrolling method and apparatus to solve the above problems.
In order to achieve the above object, the embodiments of the present invention adopt the following technical solutions:
in a first aspect, an embodiment of the present invention provides an image scrolling method, where the image scrolling method includes:
determining the current position coordinates of the image to be displayed according to the initial position coordinates of the image to be displayed and through a preset rolling speed, a preset rolling direction and a preset rolling duration; the initial position coordinates and the current position coordinates respectively represent position information of the image to be displayed, which is determined by taking a preset display area as a reference and is respectively positioned at an initial position and a current position;
determining a third position coordinate of each pixel to be displayed according to the current position coordinate and the first position coordinate of the display area and the second position coordinate of each pixel to be displayed in a preset clipping area; the first position coordinate represents position information of the display area determined by taking a preset frame buffer area as a reference, the second position coordinate represents position information of each pixel to be displayed determined by taking the frame buffer area as the reference, and the third position coordinate represents position information of each pixel to be displayed determined by taking the image to be displayed as the reference;
inquiring color change parameters of each pixel to be displayed from a pre-established pixel change index table according to the third position coordinate;
and updating the color of each target pixel according to the pixel change index table, wherein the color change parameter of each target pixel is matched with a preset reference parameter.
In a second aspect, an embodiment of the present invention further provides an image scrolling display device, where the image scrolling display device includes:
the coordinate determination unit is used for determining the current position coordinates of the image to be displayed through a preset rolling speed, a preset rolling direction and a preset rolling duration according to the initial position coordinates of the image to be displayed, wherein the initial position coordinates and the current position coordinates respectively represent position information of the image to be displayed, which is determined by taking a preset display area as a reference and is respectively positioned at the initial position and the current position;
the coordinate determination unit is further used for determining a third position coordinate of each pixel to be displayed according to the current position coordinate and through the first position coordinate of the display area and the second position coordinate of each pixel to be displayed in a preset clipping area; the first position coordinate represents position information of the display area determined by taking a preset frame buffer area as a reference, the second position coordinate represents position information of each pixel to be displayed determined by taking the frame buffer area as the reference, and the third position coordinate represents position information of each pixel to be displayed determined by taking the image to be displayed as the reference;
the query unit is used for querying the color change parameter of each pixel to be displayed from a pre-established pixel change index table according to the third position coordinate;
and the updating unit is used for updating the color of each target pixel according to the pixel change index table, wherein the color change parameter of each target pixel is matched with a preset reference parameter.
The image scrolling display method and device provided by the embodiment of the invention determine the current position coordinate of the image to be displayed through the preset scrolling speed, the preset scrolling direction and the scrolling duration according to the initial position coordinate of the image to be displayed, determine the third position coordinate of each pixel to be displayed through the first position coordinate of the display area and the second position coordinate of each pixel to be displayed in the preset clipping area according to the current position coordinate, then query the color change parameter of each pixel to be displayed from the preset pixel change index table according to the third position coordinate, and finally update the color of each target pixel according to the pixel change index table. According to the pixel change index table, whether the color of the pixel to be displayed is changed or not is judged through the third position coordinate of each pixel to be displayed, if the color is changed, the color of the pixel to be displayed is updated according to the pixel change index table, namely, the color of the pixel with the changeable color is updated only, so that the refreshing of all pixels in a display area is avoided, the occupancy rate of system resources is reduced, and the refreshing efficiency is improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a block schematic diagram of an image processing apparatus.
Fig. 2 is a flowchart of an image scrolling method.
Fig. 3 is a schematic diagram of an image to be displayed before and after scrolling with respect to a display area.
FIG. 4 is a diagram showing the distribution of the frame buffer, display area, and cropping area.
Fig. 5 is a detailed flowchart of S203 in fig. 2.
Fig. 6 is a schematic diagram of before and after scrolling of an image to be displayed.
Fig. 7 is a schematic view of scrolling an image to be displayed.
FIG. 8 is a schematic diagram of pixel refresh of an image to be displayed.
Fig. 9 is a functional block diagram showing an image scrolling display device according to the present invention.
Icon: 100-an image processing device; 111-a memory; 112-a processor; 113-a communication unit; 200-image scrolling display device; 210-a coordinate determination unit; 220-index table establishing unit; 230-a judging unit; 240-a query unit; 250-update unit.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Fig. 1 is a block diagram of an image processing apparatus 100. The image processing apparatus 100 includes a memory 111, a processor 112, and a communication unit 113. The memory 111, the processor 112 and the communication unit 113 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 111 is used to store programs or data. The Memory 111 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM) 111, a Programmable Read Only Memory (PROM), an Erasable Read Only Memory (EPROM), an electrically Erasable Read Only Memory (EEPROM), and the like.
The processor 112 is used to read/write data or programs stored in the memory 111 and perform corresponding functions.
The communication unit 113 is configured to establish a communication connection between the image processing apparatus 100 and another communication terminal via the network, and to transceive data via the network.
Note that the image processing apparatus 100 may be a mobile phone, a tablet computer, or the like.
It should be understood that the structure shown in fig. 1 is only a schematic structural diagram of the image processing apparatus 100, and the image processing apparatus 100 may further include more or less components than those shown in fig. 1, or have a different configuration from that shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
The embodiment of the invention provides an image scrolling display method, which is used for scrolling and displaying images. Please refer to fig. 2, which is a flowchart illustrating an image scrolling method according to the present invention. The image scrolling display method comprises the following steps:
s201, according to the initial position coordinates of the image to be displayed, the current position coordinates of the image to be displayed are determined through a preset rolling speed, a preset rolling direction and a preset rolling duration.
The initial position coordinates and the current position coordinates respectively represent position information of the image to be displayed, which is determined by taking a preset display area as a reference and is in the preset display area when the image to be displayed is at the initial position and the current position.
In an optional implementation manner, the upper left corner of the display area is used as a coordinate origin, a straight line passing through the coordinate origin in the horizontal direction is an x-axis, and a straight line passing through the coordinate origin in the vertical direction is a y-axis to establish a coordinate system, and then the initial position coordinate is the coordinate when the image to be displayed is at the initial position, and the current position coordinate is the coordinate when the image to be displayed is at the current position.
It should be noted that, in another optional embodiment, the upper left corner of the display area may also be used as a coordinate origin, and two edge lines of the display area passing through the coordinate origin establish coordinate systems for the x axis and the y axis respectively to define the initial position coordinates and the current position coordinates.
Namely, the coordinate of the image to be displayed at the initial position is equivalent to the offset of the image to be displayed at the initial position relative to the preset display area; the coordinates of the image to be displayed at the current position correspond to the offset of the image to be displayed at the current position relative to the preset display area.
In the embodiment, the position coordinates of the image to be displayed are represented by the coordinates of the upper left corner of the image to be displayed; in another alternative embodiment, the coordinates of any point on the image to be displayed may be used to characterize the coordinates of the location of the image to be displayed.
In addition, it should be noted that the initial position coordinates of the image to be displayed are preset, and may be different according to the specific display requirements of the user.
Specifically, when the scroll direction is the horizontal direction, the pass equation
Figure BDA0001917653060000071
And determining the current position coordinates of the image to be displayed.
When the rolling direction is vertical, the formula
Figure BDA0001917653060000072
And determining the current position coordinates of the image to be displayed.
Wherein, (x _ s) 0 ,y_s 0 ) The initial position coordinates of the image to be displayed are (x _ s, y _ s) the current position coordinates of the image to be displayed, v is a preset scrolling speed, t is a scrolling duration, and k is a constant representing the scrolling direction.
Meanwhile, when the scrolling direction is horizontal to the right or vertical to the down, k is 1; when the scrolling direction is horizontal to the left or vertical to the top, k is-1.
For example, as shown in fig. 3, the image to be displayed is shown before and after scrolling with respect to the display area. The shadow area represents a display area, A1 represents a position relation graph of an image to be displayed and the display area when the image to be displayed is in an initial state, and C1(x1, y1) is an initial coordinate of the image to be displayed; a2 represents a positional relationship diagram of an image to be displayed with a display area when the image to be displayed is in the current state, and C2(x2, y2) is the current coordinates of the image to be displayed, and 1 unit time is spent from the a1 state to the a2 state, scrolling by 2 pixels per unit time. The current coordinates C2(x2, y2) can thus be characterized by the following equation:
Figure BDA0001917653060000073
s202, according to the current position coordinate, determining a third position coordinate of each pixel to be displayed through the first position coordinate of the display area and the second position coordinate of each pixel to be displayed in the preset clipping area.
The first position coordinate represents position information of a display area determined by taking a preset Frame Buffer (FB) as a reference, the second position coordinate represents position information of each pixel to be displayed determined by taking the frame buffer as the reference, and the third position coordinate represents position information of each pixel to be displayed determined by taking an image to be displayed as the reference. That is, the second position coordinate and the third position coordinate of the pixel to be displayed respectively represent the offset of the pixel to be displayed in different reference objects, i.e. in different coordinate systems.
The frame buffer area is an area containing complete frame data of an image to be displayed and is used for driving the video display equipment, and by pre-establishing the frame buffer area, the operations of reading/writing, updating and the like can be carried out on the data in the frame buffer area only when the image is displayed in a rolling mode, characters in a word bank or the image in the storage 111 do not need to be called, the occupation of a system memory and a CPU is reduced, and the overall response speed of the system is improved.
The display area is an area which is pre-established in a frame buffer area and can be used for displaying an image to be displayed; the cropping area is an area in the display area where the image to be displayed is actually displayed, and may also be understood as an area in which the image to be displayed is actually displayed through the display area. In addition, the area of the cropping zone is generally less than or equal to the area of the display region; specifically, the area of the cropping zone is related to the area of the image to be displayed.
It can be understood that, when the display area is established in advance, any point in the frame buffer area can be used as the first position coordinate of the display area according to the requirement, and then the area where the display area is located is determined according to the area of the display area; after the display area is determined, the number of the pixels to be displayed in the cropping area and the second position coordinate of each pixel to be displayed can be determined according to the relative position relation between the image to be displayed and the display area.
In an optional implementation manner, the upper left corner of a preset frame buffer area is used as a coordinate origin, a straight line passing through the coordinate origin in the horizontal direction is used as an x-axis, a straight line passing through the coordinate origin in the vertical direction is used as a y-axis to establish a coordinate system, and then the coordinate of the upper left corner of the display area is the offset of the display area relative to the preset frame buffer area; the offset of each pixel to be displayed relative to the frame buffer is the coordinate of each pixel to be displayed in the coordinate system established based on the frame buffer.
Specifically, the formula of
Figure BDA0001917653060000091
And determining the third position coordinate of each pixel to be displayed in the cropping area.
Wherein, (X, Y) is a first position coordinate of the display area, (X _ q, Y _ q) is a second position coordinate of the pixel to be displayed, (X _ s, Y _ s) is a current position coordinate of the image to be displayed, and (X _ t, Y _ t) is a third position coordinate of the pixel to be displayed.
For example, as shown in FIG. 4, the distribution of the frame buffer, the display area, and the cropping area is illustrated. In fig. 4, a region surrounded by the solid line L1 is a frame buffer, a region surrounded by the dashed line L2 is a display region, a region surrounded by the dashed line L3 is an image to be displayed, and a shadow region where the region surrounded by the dashed line L2 overlaps with the region surrounded by the dashed line L3 is a cropping region. The complete image to be displayed should be the area enclosed by the dashed line L3, but due to the width limitation of the display area and the height limitation of the image to be displayed, only the shadow area can finally display the image, thereby constituting the cropping area.
Meanwhile, the second position coordinate of one pixel M to be displayed in the cropping area is known as (X _ q, Y _ q), so that if the coordinate system is established by taking the upper left corner (X, Y) of the display area as the origin, the position coordinate of the pixel M to be displayed should be (X _ q-X, Y _ q-Y), and the coordinate of the upper left corner of the image to be displayed at this time is (X _ s, Y _ s), so that the coordinate system is established by taking the upper left corner of the image to be displayed as the origin again, and the third position coordinate of the pixel M to be displayed is obtained as (X _ q-X _ s, Y _ q-Y _ s).
S203, according to the image to be displayed, a pixel change index table is established through a preset rolling speed and a preset rolling direction.
The pixel change index table comprises a plurality of coordinates determined by taking the scrolled image to be displayed as a reference and a color change parameter corresponding to each coordinate. Specifically, the coordinates are determined based on a coordinate system established after the scrolling, that is, after the upper left corner of the image to be displayed in the current state is the origin of coordinates, a straight line passing through the origin of coordinates in the horizontal direction is the x-axis, and a straight line passing through the origin of coordinates in the vertical direction is the y-axis.
Please refer to fig. 5, which is a flowchart illustrating the process of S203. The S203 includes:
s2031, traversing each pixel of the image to be displayed to determine first color information of each pixel corresponding to the coordinate determined based on the scrolled image to be displayed after the image to be displayed is scrolled.
It can be understood that the scrolled image to be displayed is the image to be displayed in the current state, and at this time, the first color information of the pixel corresponding to each coordinate of the image to be displayed is traversed to be used as a variable for comparison.
S2032, according to the image to be displayed, calculating second color information of each pixel corresponding to the coordinate determined based on the scrolled image to be displayed before the image to be displayed is scrolled by using the preset scrolling speed and the preset scrolling direction.
For example, please refer to fig. 6, which is a schematic diagram of an image to be displayed before and after scrolling. Where B1 denotes an image to be displayed in the current state, and B2 denotes a calculated image to be displayed before scrolling. The coordinates of the pixel 5 of the image to be displayed in the current state are (5, 0), and if the preset scrolling direction is horizontal to the right and the image is scrolled by 1 pixel each time, it can be calculated that the pixel corresponding to the coordinate (5, 0) in the image to be displayed before scrolling should be one bit left of the pixel 5, that is, the pixel 4 of the image to be displayed. Meanwhile, the color information of the pixel 5 is read as the first color information, and the color information of the pixel 4 is read as the second color information.
S2033, color change parameters corresponding to the coordinates determined with reference to the scrolled display area are determined based on the first color information and the second color information corresponding to each coordinate.
Specifically, if the first color information is different from the second color information, determining the color change parameter as TRUE (1) to indicate that the color of the pixel corresponding to the coordinate changes in the scrolling process; if the first color information is the same as the second color information, the color change parameter is determined to be FALSE (0), so as to indicate that the color of the pixel corresponding to the coordinate does not change during the scrolling process.
S2034, establishing a pixel change index table according to each coordinate and the corresponding color change parameter.
And S204, judging whether the third position coordinate is in the area of the image to be displayed, if not, executing S205, and if so, executing S206.
Knowing the current position coordinates, the length and the width of the image to be displayed, the equation expression of the area where the image to be displayed is located can be determined, so that whether the third position coordinates are in the area where the image to be displayed is located can be judged.
And S205, updating the color of the pixel corresponding to the third position coordinate to a preset background color.
It should be noted that the image to be displayed usually includes background information and character information, and usually, the background information is displayed in one color and the character information is displayed in another color.
When the third position coordinate is outside the area where the image to be displayed is located, the color of the pixel corresponding to the third position coordinate is directly updated to the preset background color, so that the display effect is more attractive.
And S206, inquiring the color change parameter of each pixel to be displayed from the pre-established pixel change index table according to the third position coordinate.
And S207, updating the color of each target pixel according to the pixel change index table.
And the color change parameter of each target pixel is matched with a preset reference parameter.
It should be noted that, in this embodiment, the reference parameter is TRUE (1), and if the color change parameter of a certain pixel to be displayed is consistent with the reference parameter, the two parameters are considered to be matched. Meanwhile, the color change parameters of the pixels to be displayed are matched with the preset reference parameters, namely, the color of the pixels to be displayed is changed in the rolling process, and only the pixels to be displayed with the changed colors are subjected to color updating, so that the refreshing of all pixels in a display area is avoided, the occupancy rate of system resources is reduced, and the refreshing efficiency is improved.
Specifically, after determining which pixels to be displayed have changed colors, the first color information of the pixels to be displayed is queried according to the pixel change index table to determine the color which should be displayed in the current state, and then the color of the pixels to be displayed is updated to the color which should be displayed in the current state.
For example, as shown in fig. 7, a schematic view of scrolling an image to be displayed is shown. Therefore, when the image to be displayed is scrolled from the position a1 to the position a2, the scrolling effect of the image to be displayed can be realized only by refreshing the colors of the pixels at the positions 1 and 2 in fig. 8; wherein, the pixel marked with 1 is updated to white from black, and the pixel marked with 2 is updated to black from white.
In order to execute the corresponding steps in the above embodiments and various possible manners, an implementation manner of the image scrolling display device 200 is given below, and optionally, the image scrolling display device 200 may adopt the device structure of the image processing apparatus 100 shown in fig. 1. Further, referring to fig. 9, fig. 9 is a diagram illustrating an image scrolling display device 200 according to an embodiment of the invention. It should be noted that the image scrolling display device 200 provided in the present embodiment has the same basic principle and technical effects as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments. The image scroll display apparatus 200 includes a coordinate determination unit 210, an index table creation unit 220, a judgment unit 230, a search unit 240, and an update unit 250.
The coordinate determination unit 210 is configured to determine, according to the initial position coordinate of the image to be displayed, the current position coordinate of the image to be displayed through a preset scrolling speed, a preset scrolling direction, and a preset scrolling duration.
It is to be appreciated that in an alternative embodiment, the coordinate determination unit 210 may be configured to perform S201.
The coordinate determination unit 210 is further configured to determine, according to the current position coordinate, a third position coordinate of each pixel to be displayed according to the first position coordinate of the display area and the second position coordinate of each pixel to be displayed in the preset clipping area.
It is to be appreciated that in an alternative embodiment, the coordinate determination unit 210 may be configured to perform S202.
The index table creating unit 220 is configured to create a pixel change index table according to the image to be displayed, by using a preset scrolling speed and a preset scrolling direction.
Specifically, the index table establishing unit 220 is configured to traverse each pixel of the image to be displayed to determine first color information of each pixel corresponding to a coordinate determined based on the scrolled image to be displayed after the image to be displayed is scrolled, calculate, according to the image to be displayed, second color information of each pixel corresponding to a coordinate determined based on the scrolled image to be displayed before the image to be displayed is scrolled by using a preset scrolling speed and a preset scrolling direction, determine, based on the first color information and the second color information corresponding to each coordinate, a color change parameter corresponding to a coordinate determined based on the scrolled display area, and establish the pixel change index table according to each coordinate and the color change parameter corresponding to each coordinate.
It is understood that, in an alternative embodiment, the index table establishing unit 220 may be configured to execute S203, S2031, S2032, S2033, and S2034.
The determining unit 230 is configured to determine whether the third position coordinate is in an area where the image to be displayed is located.
It is to be appreciated that in an alternative embodiment, the determining unit 230 may be configured to perform S204.
The updating unit 250 is configured to update the color of the pixel corresponding to the third position coordinate to a preset background color when the third position coordinate is outside the region where the image to be displayed is located.
It is to be appreciated that in an alternative embodiment, the updating unit 250 may be configured to perform S205.
The query unit 240 is configured to query, when the third position coordinate is located in the area where the image to be displayed is located, the color change parameter of each pixel to be displayed from the pre-established pixel change index table according to the third position coordinate.
It is to be appreciated that in an alternative embodiment, the query unit 240 may be configured to perform S206.
The updating unit 250 is configured to perform color updating on each target pixel according to the pixel change index table.
It is to be appreciated that in an alternative embodiment, the updating unit 250 may be configured to perform S207.
Alternatively, the modules may be stored in the memory 111 shown in fig. 1 in the form of software or Firmware (Firmware) or be fixed in an Operating System (OS) of the user equipment, and may be executed by the processor 112 in fig. 1. Meanwhile, data, codes of programs, and the like required to execute the above modules may be stored in the memory 111.
In summary, according to the image scrolling method and apparatus provided in the embodiments of the present invention, the current position coordinate of the image to be displayed is determined according to the initial position coordinate of the image to be displayed, the preset scrolling speed, the preset scrolling direction, and the scrolling duration, the third position coordinate of each pixel to be displayed is determined according to the current position coordinate, the first position coordinate of the display area and the second position coordinate of each pixel to be displayed in the preset clipping area, the color change parameter of each pixel to be displayed is queried from the pre-established pixel change index table according to the third position coordinate, and finally, the color of each target pixel is updated according to the pixel change index table. According to the pixel change index table, whether the color of the pixel to be displayed changes or not is judged through the third position coordinate of each pixel to be displayed, if the color changes, the color of the pixel to be displayed is updated according to the pixel change index table, namely, the color of the pixel which can change in color is updated only, so that the refreshing of all pixels in a display area is avoided, the occupancy rate of system resources is reduced, and the refreshing efficiency is improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An image scroll display method, characterized by comprising:
determining the current position coordinate of the image to be displayed according to the initial position coordinate of the image to be displayed and the preset rolling speed, the preset rolling direction and the preset rolling duration; the initial position coordinates and the current position coordinates respectively represent position information of the image to be displayed, which is determined by taking a preset display area as a reference and is respectively positioned at an initial position and a current position;
determining a third position coordinate of each pixel to be displayed according to the current position coordinate and the first position coordinate of the display area and the second position coordinate of each pixel to be displayed in a preset clipping area; the first position coordinate represents position information of the display area determined by taking a preset frame buffer area as a reference, the second position coordinate represents position information of each pixel to be displayed determined by taking the frame buffer area as a reference, the third position coordinate represents position information of each pixel to be displayed determined by taking the image to be displayed as a reference, the preset cutting area is an area in the display area for actually displaying the image to be displayed, the preset frame buffer area is an area containing complete data of the image to be displayed, and the preset frame buffer area is used for driving video display equipment;
inquiring color change parameters of each pixel to be displayed from a pre-established pixel change index table according to the third position coordinate;
and updating the color of each target pixel according to the pixel change index table, wherein the color change parameter of each target pixel is matched with a preset reference parameter.
2. The image scrolling method according to claim 1, wherein before the step of querying the color change parameter of each pixel to be displayed from the pre-established pixel change index table according to the third position coordinate, the image scrolling method further comprises:
establishing the pixel change index table according to the image to be displayed through a preset rolling speed and a preset rolling direction; the pixel change index table comprises a plurality of coordinates determined by taking the scrolled image to be displayed as a reference and a color change parameter corresponding to each coordinate.
3. The image scrolling method according to claim 2, wherein the step of establishing the pixel variation index table according to the image to be displayed by a preset scrolling speed and a preset scrolling direction comprises:
traversing each pixel of the image to be displayed to determine first color information of each pixel corresponding to the coordinate determined by taking the scrolled image to be displayed as a reference after the image to be displayed is scrolled;
according to the image to be displayed, calculating second color information of each pixel corresponding to the coordinate determined by taking the image to be displayed after rolling as a reference before the image to be displayed rolls through a preset rolling speed and a preset rolling direction;
determining color change parameters corresponding to the coordinates determined by taking the scrolled display area as a reference based on the first color information and the second color information corresponding to each coordinate;
and establishing the pixel change index table according to each coordinate and the corresponding color change parameter.
4. The image scrolling method according to claim 1, wherein before the step of updating the color of each target pixel according to the pixel change index table, the image scrolling method further comprises:
judging whether the third position coordinate is in the area of the image to be displayed;
the step of updating the color of each target pixel according to the pixel change index table includes:
and when the third position coordinate is in the area of the image to be displayed, updating the color of each target pixel according to the pixel change index table.
5. The image scrolling method according to claim 4, wherein after the step of determining whether the third position coordinate is within the area where the image to be displayed is located, the image scrolling method further comprises:
and when the third position coordinate is outside the area of the image to be displayed, updating the color of the pixel corresponding to the third position coordinate to a preset background color.
6. The method according to any one of claims 1 to 5, wherein the step of determining the current position coordinates of the image to be displayed according to the initial position coordinates of the image to be displayed by a preset scrolling speed, a preset scrolling direction and a preset scrolling duration comprises:
when the rolling direction is horizontal, the formula
Figure FDA0003654196830000031
Determining the current position coordinates of the image to be displayed;
when the rolling direction is vertical, the formula
Figure FDA0003654196830000032
Determining the current position coordinates of the image to be displayed;
wherein, (x _ s) 0 ,y_s 0 ) The method comprises the steps that initial position coordinates of an image to be displayed are obtained, (x _ s, y _ s) are current position coordinates of the image to be displayed, v is a preset scrolling speed, t is a scrolling duration, k is a constant representing a scrolling direction, and when the scrolling direction is horizontal rightward or vertical downward, k is 1; when the scrolling direction is horizontally to the left or vertically up, k is-1.
7. The image scrolling display method according to any one of claims 1 to 5, wherein a coordinate system is established with the upper left corner of the preset frame buffer as the origin of coordinates, a straight line passing through the origin of coordinates in the horizontal direction as an x-axis, and a straight line passing through the origin of coordinates in the vertical direction as a y-axis, and then the coordinates of the upper left corner of the display area are the offset of the display area relative to the preset frame buffer; the step of determining, according to the current position coordinate, a third position coordinate of each pixel to be displayed by using the first position coordinate of the display region and the second position coordinate of each pixel to be displayed in the preset clipping region includes:
passing through formula
Figure FDA0003654196830000041
Determining a third position coordinate of each pixel to be displayed;
wherein, (X, Y) is a first position coordinate of the display area, (X _ q, Y _ q) is a second position coordinate of the pixel to be displayed, (X _ s, Y _ s) is a current position coordinate of the image to be displayed, and (X _ t, Y _ t) is a third position coordinate of the pixel to be displayed.
8. An image scrolling display device, characterized in that the image scrolling display device comprises:
the coordinate determination unit is used for determining the current position coordinates of the image to be displayed through a preset rolling speed, a preset rolling direction and a preset rolling duration according to the initial position coordinates of the image to be displayed, wherein the initial position coordinates and the current position coordinates respectively represent position information of the image to be displayed, which is determined by taking a preset display area as a reference and is respectively positioned at the initial position and the current position;
the coordinate determination unit is further used for determining a third position coordinate of each pixel to be displayed according to the current position coordinate and the first position coordinate of the display area and the second position coordinate of each pixel to be displayed in a preset clipping area; the first position coordinates represent position information of the display area determined by taking a preset frame buffer area as a reference, the second position coordinates represent position information of each pixel to be displayed determined by taking the frame buffer area as a reference, the third position coordinates represent position information of each pixel to be displayed determined by taking the image to be displayed as a reference, the preset cutting area is an area of the display area where the image to be displayed is actually displayed, the preset frame buffer area is an area containing complete data of the image to be displayed, and the preset frame buffer area is used for driving video display equipment;
the query unit is used for querying the color change parameter of each pixel to be displayed from a pre-established pixel change index table according to the third position coordinate;
and the updating unit is used for updating the color of each target pixel according to the pixel change index table, wherein the color change parameter of each target pixel is matched with a preset reference parameter.
9. The image scrolling display device according to claim 8, further comprising:
the index table establishing unit is used for establishing the pixel change index table according to the image to be displayed through a preset rolling speed and a preset rolling direction; the pixel change index table comprises a plurality of coordinates determined by taking the scrolled image to be displayed as a reference and a color change parameter corresponding to each coordinate.
10. The image scrolling display device according to claim 8, further comprising:
the judging unit is used for judging whether the third position coordinate is in the area where the image to be displayed is located;
and the updating unit is also used for updating the color of each target pixel according to the pixel change index table when the third position coordinate is in the area of the image to be displayed.
CN201811580051.0A 2018-12-24 2018-12-24 Image scrolling display method and device Active CN111352598B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811580051.0A CN111352598B (en) 2018-12-24 2018-12-24 Image scrolling display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811580051.0A CN111352598B (en) 2018-12-24 2018-12-24 Image scrolling display method and device

Publications (2)

Publication Number Publication Date
CN111352598A CN111352598A (en) 2020-06-30
CN111352598B true CN111352598B (en) 2022-08-23

Family

ID=71195364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811580051.0A Active CN111352598B (en) 2018-12-24 2018-12-24 Image scrolling display method and device

Country Status (1)

Country Link
CN (1) CN111352598B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112286475B (en) * 2020-10-30 2022-09-30 海信电子科技(武汉)有限公司 Text display method and display device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4663617A (en) * 1984-02-21 1987-05-05 International Business Machines Graphics image relocation for display viewporting and pel scrolling
US4922238A (en) * 1985-05-30 1990-05-01 International Business Machines Corporation Method and system for smooth scrolling of a displayed image on a display screen
EP0486090A2 (en) * 1990-11-14 1992-05-20 Philips Electronics Uk Limited Display method and apparatus
CN104464593A (en) * 2014-11-21 2015-03-25 京东方科技集团股份有限公司 Drive method for display device, and display frame renewing method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002287681A (en) * 2001-03-27 2002-10-04 Mitsubishi Electric Corp Partial holding type display controller and partial holding type display control method
FR2846115A1 (en) * 2002-10-16 2004-04-23 Canal Plus Technologies Hypertext markup-language document displaying process for digital television, involves recopying contents of pixel map of buffer memory when document is displayed or flashed, where memory is created for visible part of document
JP5163208B2 (en) * 2008-03-19 2013-03-13 セイコーエプソン株式会社 Display device and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4663617A (en) * 1984-02-21 1987-05-05 International Business Machines Graphics image relocation for display viewporting and pel scrolling
US4922238A (en) * 1985-05-30 1990-05-01 International Business Machines Corporation Method and system for smooth scrolling of a displayed image on a display screen
EP0486090A2 (en) * 1990-11-14 1992-05-20 Philips Electronics Uk Limited Display method and apparatus
CN104464593A (en) * 2014-11-21 2015-03-25 京东方科技集团股份有限公司 Drive method for display device, and display frame renewing method and device

Also Published As

Publication number Publication date
CN111352598A (en) 2020-06-30

Similar Documents

Publication Publication Date Title
WO2017177931A1 (en) Text information display method and apparatus, and mobile device
CN108205960B (en) Method and device for rendering characters, electronic map making system and navigation system
KR102591542B1 (en) Table processing methods, devices, smart interactive tablets and storage media
KR20150095658A (en) Preserving layout of region of content during modification
CN106598410B (en) Display methods, device and the terminal device of e-book
CN112667330A (en) Page display method and computer equipment
CN110766772A (en) Flatter-based cross-platform poster manufacturing method, device and equipment
CN108475182A (en) Data processing method and electric terminal
CN111352598B (en) Image scrolling display method and device
CN107391148B (en) View element saving method and device, electronic equipment and computer storage medium
CN111428455B (en) Form management method, device, equipment and storage medium
JP7185044B2 (en) Element rendering method, device, computer program and computer device
CN105389308B (en) Webpage display processing method and device
CN111783007B (en) Display rendering method and device, electronic equipment and storage medium
CN113268949B (en) Form display method and device based on dynamic fields, computer equipment and medium
CN112256175B (en) Text display method, text display device, electronic equipment and computer readable storage medium
US20230367963A1 (en) Character display method and apparatus, electronic device, and computer-readable storage medium
CN110244895B (en) Method and device for controlling banner position of input method, mobile terminal and storage medium
JPWO2019130492A1 (en) Cartoon data display system, method and program
CN110020285B (en) Histogram processing method and device
CN115129278A (en) Image display control method, system, readable storage medium and electronic device
CN114692581A (en) Electronic form sub-table display method, device, equipment and storage medium
CN111611047A (en) Method and system for optimizing list performance of mobile App
JP6264951B2 (en) Drawing apparatus, program, and drawing method
CN112287876B (en) Unmanned aerial vehicle environmental pollution remote measurement data processing method and system based on block chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant