Method and apparatus for displaying instant messaging (IM) message
First Claim
Patent Images
1. A method for displaying an Instant Messaging (IM) message, comprising:
- when a size of a picture to be processed is greater than a size of a container, setting a display size of the picture to be processed to be not greater than the size of the container;
drawing the picture to be processed according to the set display size;
setting an identification mark for visible content of the Nth line of a message in the container, wherein N is a positive integer, and the identification mark comprises a set of sequence numbers of one or more characters in the message, the one or more characters being selected from the visible content of the Nth line of the message, wherein the set of sequence number of the one or more characters in the message is not visually displayed with the message;
after the container size is changed to obtain a second changed container, searching for a line number of the identification mark in the second changed container;
determining whether the line number of the identification mark in the second changed container is the Nth line in the second changed container; and
when the line number of the identification mark in the second changed container is not the Nth line in the second changed container, moving a display area of the second changed container without scrolling, and assigning a line where the identification mark locates as the Nth line of the display area of the second changed container.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and an apparatus for displaying an Instant Messaging (IM) message are provided. The method includes, when the size of a picture to be processed is greater than the size of a container, setting the display size of the picture to be processed to be not greater than the size of the container; and drawing the picture to be processed according to the set display size. As such, a picture to be processed having the size greater than the container size can be adapted to the size of a container in IM software, and the IM software can directly display the entirety of the picture that is originally greater than the container size.
22 Citations
20 Claims
-
1. A method for displaying an Instant Messaging (IM) message, comprising:
-
when a size of a picture to be processed is greater than a size of a container, setting a display size of the picture to be processed to be not greater than the size of the container; drawing the picture to be processed according to the set display size; setting an identification mark for visible content of the Nth line of a message in the container, wherein N is a positive integer, and the identification mark comprises a set of sequence numbers of one or more characters in the message, the one or more characters being selected from the visible content of the Nth line of the message, wherein the set of sequence number of the one or more characters in the message is not visually displayed with the message; after the container size is changed to obtain a second changed container, searching for a line number of the identification mark in the second changed container; determining whether the line number of the identification mark in the second changed container is the Nth line in the second changed container; and when the line number of the identification mark in the second changed container is not the Nth line in the second changed container, moving a display area of the second changed container without scrolling, and assigning a line where the identification mark locates as the Nth line of the display area of the second changed container.
-
-
2. The method for displaying an IM message according to claim 1, wherein the step of setting the identification mark for the visible content of the Nth line of the message in the container comprises:
selecting the one or more characters from the visible content of the Nth line, acquiring a sequence number of each selected character in the whole message content; and
designating the set of the acquired sequence number as the identification mark.
-
3. The method for displaying an IM message according to claim 1, further comprising:
-
calculating a change scale of the display size of the picture to be processed with respect to the size of the picture to be processed; drawing a compression tag at a designated position of the picture, the compression tag being adapted to indicate that the display size of the corresponding picture in the container is compressed with respect to the size of the picture; and associating the change scale with the compression tag, so that the change scale is displayed when a mouse moves to the compression tag or a mouse clicks the compression tag.
-
-
4. The method for displaying an IM message according to claim 1, prior to the step of setting the display size of the picture to be processed to be not greater than the size of the container, further comprising:
-
determining whether the size of the container is changed; and after the size of the container is changed to obtain a first changed container, acquiring the size of the first changed container, and assigning the first changed container as a current container.
-
-
5. The method for displaying an IM message according to claim 1, further comprising:
linking display content of the picture to be processed to an original address of the picture.
-
6. The method for displaying an IM message according to claim 1, further comprising:
opening the picture to be processed by using a system default program for opening a picture to be processed.
-
7. The method for displaying an IM message according to claim 1, wherein the step of setting the display size of the picture to be processed to be not greater than the size of the container comprises one of:
-
setting a display width of the picture to be processed to a width of the container, and setting a display height of the picture to be processed to a height of the container; setting the display width of the picture to be processed to the width of the container; and
calculating the display height of the picture to be processed according to a change rate of the display width of the picture to be processed with respect to the width of the picture to be processed; andsetting the display height of the picture to be processed to the height of the container; and
calculating the display width of the picture to be processed according to a change rate of the display height of the picture to be processed with respect to the height of the picture to be processed.
-
-
8. The method for displaying an IM message according to claim 7, wherein the step of drawing the picture to be processed according to the set display size comprises:
- drawing the picture to be processed according to the display width and the display height of the picture to be processed.
-
9. An apparatus for displaying an Instant Messaging (IM) message, comprising:
-
a processing unit comprising one or more processors; a setting unit, adapted to set a display size of the picture to be processed to be not greater than a size of a container when the size of a picture to be processed is greater than the size of the container; and a first drawing unit, adapted to draw the picture to be processed according to the set display size; an identification unit, adapted to set an identification mark for visible content of the Nth line of a message in the container, wherein N is a positive integer, and the identification mark comprises a set of sequence numbers of one or more characters in the message, the one or more characters being selected from the visible content of the Nth line of the message, wherein the set of sequence number of the one or more characters in the message is not visually displayed with the message; a searching unit, used to search for a line number of the identification mark in the second changed container after the container size is changed to obtain a second changed container; a first determining unit, adapted to determine whether the line of the identification mark in the second changed container is in the Nth line second changed container; and a moving unit, used to move a display area of the second changed container without scrolling when the line number of the identification mark in the second changed container is not the Nth line in the second changed container, and assign a line where the identification mark locates as the Nth line of the display area in the second changed container.
-
-
10. The apparatus for displaying an IM message according to claim 9, wherein the identification unit for setting the identification mark for the visible content of the Nth line of the message in the container is further adapted to select the one or more characters from the visible content of the Nth line, acquire a sequence number of each selected character in the whole message content;
- and designate the set of the acquired sequence number as the identification mark.
-
11. The apparatus for displaying an IM message according to claim 9, further comprising:
-
a calculation unit, adapted to calculate a change scale of the display size of the picture to be processed with respect to the size of the picture to be processed; a second drawing unit, adapted to draw a compression tag at a designated position of the picture, the compression tag being adapted to indicate that the display size of the corresponding picture in the container is compressed with respect to the size of the picture; and a first association unit, adapted to associate the change scale with the compression tag, so that the change scale is displayed when a mouse moves to the compression tag, or a mouse clicks the compression tag.
-
-
12. The apparatus for displaying an IM message according to claim 9, further comprising:
-
a second determining unit, adapted to determine whether the size of the container is changed; an acquiring unit, adapted to acquire the size of the first changed container after the size of the container is changed to obtain a first changed container, and assign the first changed container as the current container.
-
-
13. The apparatus for displaying an IM message according to claim 9, further comprising:
a second association unit, adapted to link display content of the picture to be processed to an original address of the picture.
-
14. The apparatus for displaying an IM message according to claim 9, further comprising:
a picture opening unit, adapted to open the picture to be processed by using a system default program for opening a picture to be processed.
-
15. The apparatus for displaying an IM message according to claim 9, wherein the setting unit comprises one of:
-
a first setting module, adapted to set a display width of the picture to be processed to a width of the container, and set a display height of the picture to be processed to a height of the container; a second setting module, adapted to set the display width of the picture to be processed to the width of the container; and
calculate the display height of the picture to be processed according to a change rate of the display width of the picture to be processed with respect to the width of the picture to be processed; anda third setting module, adapted to set the display height of the picture to be processed to the height of the container; and
calculate the display width of the picture to be processed according to a change rate of the display height of the picture to be processed with respect to the height of the picture to be processed.
-
-
16. The apparatus for displaying an IM message according to claim 15, wherein the drawing unit for drawing the picture to be processed according to the set display size is further adapted to draw the picture to be processed according to the display width and the display height of the picture to be processed.
-
17. A non-transitory computer-readable medium storing instructions which, when executed by one or more processors, cause an apparatus to perform a method for displaying an IM message, the method comprising:
-
when a size of a picture to be processed is greater than a size of a container, setting a display size of the picture to be processed to be not greater than the size of the container; drawing the picture to be processed according to the set display size; setting an identification mark for visible content of the Nth line of a message in the container, wherein N is a positive integer, and the identification mark comprises a set of sequence numbers of one or more characters in the message, the one or more characters being selected from the visible content of the Nth line of the message, wherein the set of sequence number of the one or more characters in the message is not visually displayed with the message; after the container size is changed to obtain a second changed container, searching for a line number of the identification mark in the second changed container; determining whether the line number of the identification mark in the second changed container is the Nth line in the second changed container; and when the line number of the identification mark in the second changed container is not the Nth line in the second changed container, moving a display area of the second changed container without scrolling, and assigning a line where the identification mark locates as the Nth line of the display area of the second changed container.
-
-
18. The non-transitory computer-readable medium according to claim 17, further comprising:
-
calculating a change scale of the display size of the picture to be processed with respect to the size of the picture to be processed; drawing a compression tag at a designated position of the picture, the compression tag being adapted to indicate that the display size of the corresponding picture in the container is compressed with respect to the size of the picture; and associating the change scale with the compression tag, so that the change scale is displayed when a mouse moves to the compression tag or a mouse clicks the compression tag.
-
-
19. The non-transitory computer-readable medium according to claim 17, prior to the step of setting the display size of the picture to be processed to be not greater than the size of the container, further comprising:
-
determining whether the size of the container is changed; and after the size of the container is changed to obtain a first changed container, acquiring the size of the first changed container, and assigning the first changed container as a current container.
-
-
20. The non-transitory computer-readable medium according to claim 17, further comprising:
linking display content of the picture to be processed to an original address of the picture.
Specification