WO2017059651A1 - Method and apparatus for changing text colour of graphical interface - Google Patents

Method and apparatus for changing text colour of graphical interface Download PDF

Info

Publication number
WO2017059651A1
WO2017059651A1 PCT/CN2016/072029 CN2016072029W WO2017059651A1 WO 2017059651 A1 WO2017059651 A1 WO 2017059651A1 CN 2016072029 W CN2016072029 W CN 2016072029W WO 2017059651 A1 WO2017059651 A1 WO 2017059651A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory data
interface text
data table
color
pixel point
Prior art date
Application number
PCT/CN2016/072029
Other languages
French (fr)
Chinese (zh)
Inventor
孙进伟
张静
陈世雷
Original Assignee
青岛海信电器股份有限公司
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 青岛海信电器股份有限公司 filed Critical 青岛海信电器股份有限公司
Publication of WO2017059651A1 publication Critical patent/WO2017059651A1/en

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

Definitions

  • the present application relates to the field of multimedia technologies, and in particular, to a method for changing the color of a graphic interface text and a device for changing the color of a graphic interface text.
  • Display technology is being used in more and more electronic devices, such as computers, televisions, mobile phones, and the like. With the advancement of technology, display technology has evolved from the original black and white display to the current color display, bringing people a beautiful visual experience.
  • the user can adjust the color of the screen display according to the buttons set on the electronic device to obtain the best viewing effect.
  • this adjustment generally only focuses on the color of the screen display content, so that the screen looks more beautiful or more elegant, but can not change the color of the displayed graphic interface text itself.
  • the user can adjust the display color according to the color button on the TV or on the remote control, and adjust the color to make the picture look more vivid; or lighten the color to make the picture appear black and white.
  • this adjustment does not involve adjustments to the color of the displayed graphical interface text itself. For example, when people use the remote control to adjust the volume, the volume bar and volume number will appear on the TV screen, and the display color of the number will not change with the adjustment of the screen color.
  • the color of graphical interface text such as volume numbers is fixed when drawing the TV's local user interface (UI) and is hard to change. Since the data in the memory is a 256-color grayscale image, the image to be displayed by the television is generally in the ARGB format. Therefore, if you want to set the text to a certain color, the current method of changing the color of the graphic interface text is through software, when the system decodes. For a text, each pixel of the text needs to be processed separately and converted into ARGB data that can be screened. In this process, because the CPU needs to perform point-by-point conversion, this will consume a lot of CPU working time, slowing down the response speed of the UI and the system. Moreover, even in this way, the color of the graphical interface text can only be changed to the color that the system has fixedly selected during the UI design, and the text cannot be changed to the user-preferred color.
  • embodiments of the present application have been made in order to provide a method of changing the color of a graphical interface text and a corresponding apparatus for changing the color of a graphical interface text that overcomes the above problems or at least partially solves the above problems.
  • the embodiment of the present application discloses a method for changing the color of a graphic interface text, the graphic interface text having original decoded data, and the method includes:
  • the graphical interface text having the specified color is presented using the pixel point memory data.
  • the step of acquiring the memory data table of each pixel of the graphic interface text corresponding to the specified color information according to the request includes:
  • an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information is acquired from a preset color database.
  • the step of acquiring the memory data table of each pixel of the graphic interface text corresponding to the specified color information according to the request includes:
  • the step of searching for the pixel point memory data that matches the original decoded data of the graphic interface text from the in-memory data table includes:
  • pixel point memory data corresponding to the original decoded data of the graphic interface text is searched one by one;
  • the original decoded data of the graphic interface text is replaced one by one with the pixel point memory data.
  • the embodiment of the present application further discloses an apparatus for changing a text color of a graphic interface, the graphic interface text having original decoded data, and the apparatus includes:
  • a color change request receiving module configured to receive a color change request for the graphic interface text, where the request includes information of a specified color
  • An in-memory data table obtaining module configured to acquire, according to the request, an in-memory data table of each pixel of the graphic interface text corresponding to the specified color information
  • a pixel point data search module configured to search, from the memory data table, pixel point memory data that matches original decoded data of the graphic interface text;
  • a graphical interface text presentation module for presenting graphical interface text having the specified color using the pixel point memory data.
  • the memory data table obtaining module includes:
  • a preset memory data table obtaining sub-module configured to acquire, from the preset color database, an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information according to the request.
  • the memory data table obtaining module includes:
  • An RGB value input submodule configured to input an RGB value of the specified color according to the request
  • An in-memory data table calculation sub-module configured to calculate an RGB value according to the specified color
  • the memory data of each pixel of the graphic interface text of the specified color forms an in-memory data table.
  • the pixel point memory data search module includes:
  • the original decoded data traversal submodule is configured to traverse the original decoded data of the graphic interface text
  • a pixel point memory data search submodule configured to, in the memory data table, search for pixel point memory data corresponding to the original decoded data of the graphic interface text one by one;
  • a pixel point memory data replacement submodule configured to replace the original decoded data of the graphic interface text one by one with the pixel point memory data.
  • the embodiments of the present application include the following advantages:
  • the memory data table of each pixel of the graphic interface text corresponding to the specified color information is obtained, and then the pixel point memory matching the original decoded data of the graphic interface text is found from the memory data table.
  • Data, using pixel point memory data to display the graphic interface text with the specified color so that the conversion of the original decoded data can be directly read by the hardware module to complete the memory data table, without the need for point-by-point conversion by the CPU, solving the current change graphical interface Text color takes a lot of time and takes up too much CPU resources.
  • the user can calculate the memory data of each pixel of the graphic interface text of the color in real time by inputting the RGB value of a certain color, and form an in-memory data table, by calling the memory data table,
  • the graphical interface text displays the corresponding color to enable custom settings for the text color.
  • different memory data tables of different colors may be respectively called for each text according to the user's request, thereby realizing color display of the text.
  • 1 is a schematic diagram of an image displayed on a television screen after the digital "1" is decoded
  • FIG. 2 is a flow chart showing the steps of an embodiment of a method for changing the color of a graphical interface text according to the present application
  • FIG. 3 is a schematic diagram of a memory data table of each pixel of a red graphic interface text in an ARGB format
  • Figure 4 is the memory data representation of each pixel of the purple graphic interface text in ARGB format. intention
  • FIG. 5 is a structural block diagram of an apparatus embodiment for changing the color of a graphical interface text according to the present application.
  • each text has original decoded data.
  • each text is sized to be displayed in an 8*10 grid, where each grid represents a pixel on the TV screen.
  • FIG. 1 there is shown a schematic diagram of an image displayed on a television screen after the digital "1" is decoded.
  • the original decoded data of the number "1" in the memory is as shown in Table 1 below.
  • the number " 1" The original decoded data in memory is a 256-level grayscale image, not color.
  • the entire conversion process needs to be done by the CPU in a point-by-point conversion.
  • the corresponding conversion process can be represented by the following code:
  • the CPU spends a lot of time converting the original decoded data in the memory, consuming a large amount of CPU resources, thereby slowing down the response speed of the UI and the entire system.
  • one of the core concepts of the embodiments of the present application is that the memory data table of each pixel of the graphic interface text corresponding to the specified color is used to realize the conversion of the original decoded data by the hardware module of the system, thereby displaying the specified color.
  • Graphical interface text to avoid occupation of CPU resources.
  • the method may include the following steps:
  • Step 101 Receive a color change request for the graphic interface text
  • the user may send a request for changing the color of the graphic interface text to the television through the remote controller, where the request includes information of a specified color that needs to be changed, for example, the user may request the image interface text from the current The black color changes to red.
  • Step 102 Acquire, according to the request, an in-memory data table of each pixel of the graphic interface text corresponding to the specified color information;
  • the memory data table of each pixel of the graphic interface text corresponding to the specified color information may be first acquired. For example, to obtain a memory data table for each pixel of the red graphical interface text.
  • Graphical interface text The memory data table of each pixel is used to store the memory data of each pixel of a certain color.
  • the memory data table of each pixel of each color graphic interface data includes 256 pixel memory data, indicating the color format. True color data. Referring to Figures 3 and 4, A schematic diagram of an in-memory data table for each pixel of the red and purple graphical interface text in the ARGB format is shown.
  • the memory data table of each pixel of the graphic interface text can be obtained as follows:
  • an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information is acquired from a preset color database.
  • the memory data table of each pixel of the graphic interface text corresponding to a certain one or a plurality of color information may be preset in the color database of the system.
  • the memory data table of each pixel of the red graphic interface text can be preset in the color database in advance.
  • the red color can be directly extracted from the color database.
  • the memory data table of each pixel of the graphic interface text can be preset in the color database in advance.
  • the memory data table of each pixel of the graphic interface text of all colors cannot be preset in the color database, in another preferred embodiment of the present application, the memory data of each pixel of the graphic interface text is The table can also be obtained as follows:
  • the user may first input the RGB value of the color. .
  • the RGB value corresponding to light purple 203, 137, 203
  • the user may directly input the decimal RGB value with light purple (203, 137, 203)
  • the corresponding hexadecimal value (0xcb, 0x89, 0xcb).
  • the memory data of each pixel of the graphic interface text corresponding to the RGB value may be calculated according to the input RGB value to form a memory. data sheet.
  • the memory data of each pixel of the light purple graphic interface text can be calculated to form an in-memory data table.
  • Step 103 from the memory data table, find out the original text with the graphic interface Decoding data matching pixel point memory data;
  • the pixel data of the pixel corresponding to the original decoded data of the graphic interface text can be found from the memory data table.
  • the sub-step of searching, from the in-memory data table, the pixel-point memory data that matches the original decoded data of the graphic interface text may include:
  • Sub-step S1031 traversing the original decoded data of the graphic interface text
  • Sub-step S1032 in the memory data table, search for pixel point memory data corresponding to the original decoded data of the graphic interface text one by one;
  • Sub-step S1033 the original decoded data of the graphic interface text is replaced one by one with the pixel point memory data.
  • the original decoded data of the text whose color needs to be changed may be read one by one, and the pixel data corresponding to the original decoded data is searched from the memory data table of each pixel of the graphic interface text of the specified color, and The original decoded data is replaced with pixel point memory data one by one.
  • the original decoded data in Table 1 is first read one by one, and the pixel points corresponding to the original decoded data are found in the memory data table of each pixel of the red graphic interface text. Memory data, replacing the original decoded data with the found pixel memory data.
  • the second value in the original decoded data is read as 0x00, and the corresponding pixel memory data is found from the memory data table of each pixel of the red graphic interface text, and is 0x00000000, and the original decoding is replaced by 0x00000000.
  • the 80th value in the original decoded data When the 80th value in the original decoded data is read, it is 0x00, and the corresponding pixel memory data is found from the memory data table of each pixel of the red graphic interface text, which is 0x00000000, and is replaced by 0x00000000.
  • the original decoded data is 0x00.
  • Step 104 Display the graphic interface text having the specified color by using the pixel point memory data.
  • the pixel interface memory data can be used to display the graphic interface text having the specified color.
  • the memory data table of each pixel of the graphic interface text corresponding to the specified color information is obtained, and then the pixel point memory matching the original decoded data of the graphic interface text is found from the memory data table.
  • Data, using pixel point memory data to display the graphic interface text with the specified color so that the conversion of the original decoded data can be directly read by the hardware module to complete the memory data table, without the need for point-by-point conversion by the CPU, solving the current change graphical interface Text color takes a lot of time and takes up too much CPU resources.
  • the current color memory data table may be pointed to The pointer to the address points to the address of the in-memory data table whose color needs to be changed.
  • the red and green memory data tables are pre-preset in the color database
  • the color database is acquired after receiving the color change request for the graphic interface text.
  • Pre-set red memory data table press
  • the original decoded data is replaced, so that the graphical interface text is displayed in red.
  • the system may point the pointer to the address of the red memory data table to the address of the green memory data table, and then read the values in the original decoded data in turn. From the green memory data table, find the pixel point memory data corresponding to the original decoded data one by one, and replace the original decoded data with the found pixel point memory data, then the green graphic interface text can be displayed.
  • the step of finding the pixel point memory data that matches the original decoded data of the graphic interface text from the green memory data table is similar to the step 103, which is not described in this embodiment.
  • the user can change the graphical interface text to any color according to their respective preferences.
  • the user can directly input the light purple RGB value (203, 137, 203) to The RGB value calculates the memory data of each pixel of the light purple graphic interface text to form an in-memory data table. Then, the values in the original decoded data are sequentially read, and the pixel data corresponding to the original decoded data is searched out from the calculated light purple memory data table, and the original pixel data is used to replace the original data. After decoding the data, you can display the light purple graphic interface text.
  • the step of finding the pixel point memory data matching the original decoded data of the graphic interface text from the light purple memory data table is similar to the step 103, which is not described in this embodiment.
  • color display of graphical interface text can also be implemented.
  • the memory data table of different colors in the color database can be called separately for each word. For example, you can get the red memory data table, replace the original decoded data of the first word with the red pixel memory data, so that the first word is displayed in red; the pointer to the red memory data table address points to the green memory. Data table address, replacing the original decoded data of the second word with a green pixel Save the data so that the second word is displayed in green; then point the pointer to the green memory data table address to the purple memory data table address, and replace the original decoded data of the third word with the purple pixel memory data, so that The three words are displayed in purple for a color display of the graphical interface text.
  • the step of searching for the pixel point memory data matching the original decoded data of the graphic interface text is similar to the step 103 in the memory data table of the various colors, which is not described in this embodiment.
  • FIG. 5 a structural block diagram of an apparatus embodiment for changing the color of a graphical interface text according to the present application is shown. Specifically, the following modules may be included:
  • a color change request receiving module 201 configured to receive a color change request for the graphic interface text, where the request includes information specifying a color
  • the memory data table obtaining module 202 is configured to acquire, according to the request, an in-memory data table of each pixel of the graphic interface text corresponding to the specified color information;
  • a pixel point data search module 203 configured to search, from the memory data table, pixel point memory data that matches original decoded data of the graphic interface text;
  • the graphical interface text presentation module 204 is configured to display the graphical interface text having the specified color by using the pixel point memory data.
  • the in-memory data table obtaining module 202 may include the following sub-modules:
  • a preset memory data table obtaining sub-module 2021 configured to acquire, according to the request, a memory of each pixel of the graphic interface text corresponding to the specified color information from a preset color database data sheet.
  • the in-memory data table obtaining module 202 may further include the following sub-modules:
  • An RGB value input sub-module 2022 configured to input an RGB value of the specified color according to the request
  • the memory data table calculation sub-module 2023 is configured to calculate memory data of each pixel point of the graphic interface text of the specified color according to the RGB value of the specified color, to form an in-memory data table.
  • the pixel point memory data lookup module 203 may include the following submodules:
  • the original decoded data traversal sub-module 2031 is configured to traverse the original decoded data of the graphic interface text
  • a pixel point data search sub-module 2032 configured to search, in the memory data table, pixel point memory data corresponding to the original decoded data of the graphic interface text one by one;
  • the pixel point memory data replacement sub-module 2033 is configured to replace the original decoded data of the graphic interface text one by one with the pixel point memory data.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to the general purpose A processor of a computer, special purpose computer, embedded processor or other programmable data processing terminal device to generate a machine such that instructions executed by a processor of a computer or other programmable data processing terminal device are generated for implementation in a flowchart A device of a process or a plurality of processes and/or block diagrams of a function specified in a block or blocks.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.

Abstract

A method and apparatus for changing a text colour of a graphical interface. The graphical interface text has original decoding data. The method comprises: receiving a colour changing request with regard to a graphical interface text (101), wherein the request comprises information about a specified colour; acquiring a memory data table of each pixel point of a graphical interface text corresponding to the specified colour information according to the request (102); finding memory data of a pixel point that matches the original decoding data of the graphical interface text from the memory data table (103); and showing the graphical interface text with the specified colour by using the pixel point memory data (104), so that conversion of the original decoding data can be completed by a hardware module directly reading the memory data, without performing point-by-point conversion by a CPU, solving the existing problems of major time consumption and over-occupancy of CPU resources in changing a graphical interface text colour.

Description

一种更改图形界面文本颜色的方法和装置Method and device for changing text color of graphic interface
本申请要求于2015年10月08日提交中国专利局、申请号为201510646394.2、发明名称为“一种更改图形界面文本颜色的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201510646394.2, entitled "A Method and Apparatus for Changing the Color of a Graphical Interface Text", filed on October 8, 2015, the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本申请涉及多媒体技术领域,特别是涉及一种更改图形界面文本颜色的方法和一种更改图形界面文本颜色的装置。The present application relates to the field of multimedia technologies, and in particular, to a method for changing the color of a graphic interface text and a device for changing the color of a graphic interface text.
背景技术Background technique
显示技术被应用在越来越多的电子设备中,如计算机、电视机、移动电话等。随着科技的进步,显示技术也从最初的黑白显示发展到现在的彩色显示,给人们带来了绚丽的视觉体验。Display technology is being used in more and more electronic devices, such as computers, televisions, mobile phones, and the like. With the advancement of technology, display technology has evolved from the original black and white display to the current color display, bringing people a beautiful visual experience.
为了适应不同的观看需求,用户可以根据在电子设备上设置的按钮对屏幕显示的颜色进行调整,以获得最佳的观看效果。但是,这种调整一般都只针对屏幕显示内容的色彩进行调浓或调淡处理,使得屏幕看上去更艳丽或者更素雅,却无法更改显示的图形界面文本本身的颜色。以电视机为例,用户可以根据电视机上或遥控器上的颜色按钮对显示色彩进行调整,将颜色调浓,使画面看上去更鲜艳;或者将颜色调淡,使画面显示偏向黑白。但是,这种调整并不涉及对显示的图形界面文本本身颜色的调整。比如,人们在使用遥控器调整音量时,电视屏幕会出现音量条及音量数字,该数字的显示颜色并不会随着画面颜色的调整而变化。In order to adapt to different viewing needs, the user can adjust the color of the screen display according to the buttons set on the electronic device to obtain the best viewing effect. However, this adjustment generally only focuses on the color of the screen display content, so that the screen looks more beautiful or more elegant, but can not change the color of the displayed graphic interface text itself. Taking a TV as an example, the user can adjust the display color according to the color button on the TV or on the remote control, and adjust the color to make the picture look more vivid; or lighten the color to make the picture appear black and white. However, this adjustment does not involve adjustments to the color of the displayed graphical interface text itself. For example, when people use the remote control to adjust the volume, the volume bar and volume number will appear on the TV screen, and the display color of the number will not change with the adjustment of the screen color.
一般来说,类似于音量数字这类图形界面文本的颜色都是在绘制电视机本地用户界面(UI)时固定的,较难更改。由于文本在内存中的数据为256色灰度图像,但是电视机要显示的图像一般都为ARGB格式。因此,如果想要将文本设置成某种颜色,目前一种更改图形界面文本颜色的方法,是通过软件的方式,当系统解码完毕 一个文本时,需要对该文本的每个像素单独进行处理,转换成可以上屏的ARGB数据。在此过程中,由于需要CPU进行逐点转换,这会耗费大量的CPU工作时间,拖慢UI和系统的反应速度。而且,即使按照这种方法,也只能将图形界面文本的颜色更改为UI设计时系统已固定选择了的颜色,无法将文本更改为用户偏好的颜色。In general, the color of graphical interface text such as volume numbers is fixed when drawing the TV's local user interface (UI) and is hard to change. Since the data in the memory is a 256-color grayscale image, the image to be displayed by the television is generally in the ARGB format. Therefore, if you want to set the text to a certain color, the current method of changing the color of the graphic interface text is through software, when the system decodes. For a text, each pixel of the text needs to be processed separately and converted into ARGB data that can be screened. In this process, because the CPU needs to perform point-by-point conversion, this will consume a lot of CPU working time, slowing down the response speed of the UI and the system. Moreover, even in this way, the color of the graphical interface text can only be changed to the color that the system has fixedly selected during the UI design, and the text cannot be changed to the user-preferred color.
因此,目前迫切需要本领域技术人员解决的一个技术问题就是:如何按照用户偏好更改图形界面文本的颜色,提高数据转换的效率,以减少对CPU资源的耗费。Therefore, a technical problem that is urgently needed by those skilled in the art is how to change the color of the graphic interface text according to user preferences, and improve the efficiency of data conversion to reduce the consumption of CPU resources.
发明内容Summary of the invention
鉴于上述问题,提出了本申请实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种更改图形界面文本颜色的方法和相应的一种更改图形界面文本颜色的装置。In view of the above problems, embodiments of the present application have been made in order to provide a method of changing the color of a graphical interface text and a corresponding apparatus for changing the color of a graphical interface text that overcomes the above problems or at least partially solves the above problems.
为了解决上述问题,本申请实施例公开了一种更改图形界面文本颜色的方法,所述图形界面文本具有原始解码数据,所述方法包括:In order to solve the above problem, the embodiment of the present application discloses a method for changing the color of a graphic interface text, the graphic interface text having original decoded data, and the method includes:
接收针对图形界面文本的颜色更改请求,所述请求中包括指定颜色的信息;Receiving a color change request for the graphical interface text, the request including information specifying a color;
依据所述请求,获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表;Acquiring, according to the request, an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information;
从所述内存数据表中,查找出与所述图形界面文本的原始解码数据匹配的像素点内存数据;From the memory data table, finding pixel point memory data that matches original decoded data of the graphic interface text;
采用所述像素点内存数据展现具有所述指定颜色的图形界面文本。The graphical interface text having the specified color is presented using the pixel point memory data.
可选地,所述依据所述请求,获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表的步骤包括:Optionally, the step of acquiring the memory data table of each pixel of the graphic interface text corresponding to the specified color information according to the request includes:
依据所述请求,从预置的颜色数据库中获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表。And according to the request, an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information is acquired from a preset color database.
可选地,所述依据所述请求,获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表的步骤包括: Optionally, the step of acquiring the memory data table of each pixel of the graphic interface text corresponding to the specified color information according to the request includes:
依据所述请求,输入所述指定颜色的RGB值;Inputting the RGB value of the specified color according to the request;
依据所述指定颜色的RGB值,计算出所述指定颜色的图形界面文本各像素点的内存数据,形成内存数据表。Calculating the memory data of each pixel of the graphic interface text of the specified color according to the RGB value of the specified color to form an in-memory data table.
可选地,所述从所述内存数据表中,查找出与所述图形界面文本的原始解码数据匹配的像素点内存数据的步骤包括:Optionally, the step of searching for the pixel point memory data that matches the original decoded data of the graphic interface text from the in-memory data table includes:
遍历所述图形界面文本的原始解码数据;Traversing raw decoded data of the graphical interface text;
在所述内存数据表中,逐个查找出与所述图形界面文本的原始解码数据一一对应的像素点内存数据;In the memory data table, pixel point memory data corresponding to the original decoded data of the graphic interface text is searched one by one;
将所述图形界面文本的原始解码数据逐个替换为所述像素点内存数据。The original decoded data of the graphic interface text is replaced one by one with the pixel point memory data.
为了解决上述问题,本申请实施例还公开了一种更改图形界面文本颜色的装置,所述图形界面文本具有原始解码数据,所述装置包括:In order to solve the above problem, the embodiment of the present application further discloses an apparatus for changing a text color of a graphic interface, the graphic interface text having original decoded data, and the apparatus includes:
颜色更改请求接收模块,用于接收针对图形界面文本的颜色更改请求,所述请求中包括指定颜色的信息;a color change request receiving module, configured to receive a color change request for the graphic interface text, where the request includes information of a specified color;
内存数据表获取模块,用于依据所述请求,获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表;An in-memory data table obtaining module, configured to acquire, according to the request, an in-memory data table of each pixel of the graphic interface text corresponding to the specified color information;
像素点内存数据查找模块,用于从所述内存数据表中,查找出与所述图形界面文本的原始解码数据匹配的像素点内存数据;a pixel point data search module, configured to search, from the memory data table, pixel point memory data that matches original decoded data of the graphic interface text;
图形界面文本展现模块,用于采用所述像素点内存数据展现具有所述指定颜色的图形界面文本。A graphical interface text presentation module for presenting graphical interface text having the specified color using the pixel point memory data.
可选地,所述内存数据表获取模块包括:Optionally, the memory data table obtaining module includes:
预置内存数据表获取子模块,用于依据所述请求,从预置的颜色数据库中获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表。And a preset memory data table obtaining sub-module, configured to acquire, from the preset color database, an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information according to the request.
可选地,所述内存数据表获取模块包括:Optionally, the memory data table obtaining module includes:
RGB值输入子模块,用于依据所述请求,输入所述指定颜色的RGB值;An RGB value input submodule, configured to input an RGB value of the specified color according to the request;
内存数据表计算子模块,用于依据所述指定颜色的RGB值,计算出 所述指定颜色的图形界面文本各像素点的内存数据,形成内存数据表。An in-memory data table calculation sub-module, configured to calculate an RGB value according to the specified color The memory data of each pixel of the graphic interface text of the specified color forms an in-memory data table.
可选地,所述像素点内存数据查找模块包括:Optionally, the pixel point memory data search module includes:
原始解码数据遍历子模块,用于遍历所述图形界面文本的原始解码数据;The original decoded data traversal submodule is configured to traverse the original decoded data of the graphic interface text;
像素点内存数据查找子模块,用于在所述内存数据表中,逐个查找出与所述图形界面文本的原始解码数据一一对应的像素点内存数据;a pixel point memory data search submodule, configured to, in the memory data table, search for pixel point memory data corresponding to the original decoded data of the graphic interface text one by one;
像素点内存数据替换子模块,用于将所述图形界面文本的原始解码数据逐个替换为所述像素点内存数据。And a pixel point memory data replacement submodule, configured to replace the original decoded data of the graphic interface text one by one with the pixel point memory data.
与背景技术相比,本申请实施例包括以下优点:Compared with the background art, the embodiments of the present application include the following advantages:
在本申请的实施例中,通过获取与指定颜色信息相应的图形界面文本各像素点的内存数据表,然后从该内存数据表中,查找出与图形界面文本的原始解码数据匹配的像素点内存数据,采用像素点内存数据展现具有指定颜色的图形界面文本,使得对原始解码数据的转换可以由硬件模块直接读取内存数据表来完成,无需通过CPU进行逐点转换,解决了目前更改图形界面文本颜色耗费大量时间且占用CPU资源过多的问题。In the embodiment of the present application, the memory data table of each pixel of the graphic interface text corresponding to the specified color information is obtained, and then the pixel point memory matching the original decoded data of the graphic interface text is found from the memory data table. Data, using pixel point memory data to display the graphic interface text with the specified color, so that the conversion of the original decoded data can be directly read by the hardware module to complete the memory data table, without the need for point-by-point conversion by the CPU, solving the current change graphical interface Text color takes a lot of time and takes up too much CPU resources.
其次,在本申请的实施例中,用户可以通过输入某一颜色的RGB值,实时计算出该颜色的图形界面文本的各像素点内存数据,形成内存数据表,通过调用该内存数据表,使图形界面文本显示对应的颜色,从而实现对文本颜色的自定义设置。Secondly, in the embodiment of the present application, the user can calculate the memory data of each pixel of the graphic interface text of the color in real time by inputting the RGB value of a certain color, and form an in-memory data table, by calling the memory data table, The graphical interface text displays the corresponding color to enable custom settings for the text color.
第三,在本申请的实施例中,可以根据用户的请求,分别对每个文本调用不同颜色的内存数据表,从而实现文本的彩色显示。Thirdly, in the embodiment of the present application, different memory data tables of different colors may be respectively called for each text according to the user's request, thereby realizing color display of the text.
附图说明DRAWINGS
图1是数字“1”解码后在电视机屏幕上所展现的图像示意图;1 is a schematic diagram of an image displayed on a television screen after the digital "1" is decoded;
图2是本申请的一种更改图形界面文本颜色的方法实施例的步骤流程图;2 is a flow chart showing the steps of an embodiment of a method for changing the color of a graphical interface text according to the present application;
图3是ARGB格式下红色的图形界面文本各像素点的内存数据表示意图;3 is a schematic diagram of a memory data table of each pixel of a red graphic interface text in an ARGB format;
图4是ARGB格式下紫色的图形界面文本各像素点的内存数据表示 意图;Figure 4 is the memory data representation of each pixel of the purple graphic interface text in ARGB format. intention;
图5是本申请的一种更改图形界面文本颜色的装置实施例的结构框图。FIG. 5 is a structural block diagram of an apparatus embodiment for changing the color of a graphical interface text according to the present application.
具体实施方式detailed description
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。The above described objects, features and advantages of the present application will become more apparent and understood.
以电视机为例,在电视机的图形界面中,每一个文本都具有原始的解码数据。假如每一个文本的大小设置为可以显示在8*10的网格中,其中每一个网格均代表电视机屏幕上的一个像素点。参照图1,示出了数字“1”解码后在电视机屏幕上所展现的图像的示意图,那么,数字“1”在内存中的原始解码数据就如下表1所示,此时,数字“1”在内存中的原始解码数据为256阶灰度图像,并不是彩色的。Taking a television as an example, in the graphical interface of the television, each text has original decoded data. Suppose each text is sized to be displayed in an 8*10 grid, where each grid represents a pixel on the TV screen. Referring to FIG. 1, there is shown a schematic diagram of an image displayed on a television screen after the digital "1" is decoded. Then, the original decoded data of the number "1" in the memory is as shown in Table 1 below. At this time, the number " 1" The original decoded data in memory is a 256-level grayscale image, not color.
表1:Table 1:
0x000x00 0x000x00 0x000x00 0x000x00 0x000x00 0x000x00 0x000x00 0x000x00
0x000x00 0x000x00 0x000x00 0xff0xff 0x000x00 0x000x00 0x000x00 0x000x00
0x000x00 0x000x00 0x800x80 0xff0xff 0x000x00 0x000x00 0x000x00 0x000x00
0x000x00 0x000x00 0x000x00 0xff0xff 0x000x00 0x000x00 0x000x00 0x000x00
0x000x00 0x000x00 0x000x00 0xff0xff 0x000x00 0x000x00 0x000x00 0x000x00
0x000x00 0x000x00 0x000x00 0xff0xff 0x000x00 0x000x00 0x000x00 0x000x00
0x000x00 0x000x00 0x000x00 0xff0xff 0x000x00 0x000x00 0x000x00 0x000x00
0x000x00 0x000x00 0x000x00 0xff0xff 0x000x00 0x000x00 0x000x00 0x000x00
0x000x00 0x000x00 0xfa0xfa 0xff0xff 0xfa0xfa 0x000x00 0x000x00 0x000x00
0x000x00 0x000x00 0x000x00 0x000x00 0x000x00 0x000x00 0x000x00 0x000x00
由于电视机能够显示的是ARGB格式的数据,所以此时,如果想要将数字“1”更改为红色,则需要将内存中256阶灰度图像的原始解码数据转换成如下表2中的ARGB格式数据: Since the TV can display data in ARGB format, if you want to change the number "1" to red at this time, you need to convert the original decoded data of the 256-level grayscale image in the memory into ARGB in Table 2 below. Format data:
表2:Table 2:
Figure PCTCN2016072029-appb-000001
Figure PCTCN2016072029-appb-000001
而整个转换过程,需要由CPU按照逐点转换来完成。相应的转换过程可用如下代码表示:The entire conversion process needs to be done by the CPU in a point-by-point conversion. The corresponding conversion process can be represented by the following code:
Figure PCTCN2016072029-appb-000002
Figure PCTCN2016072029-appb-000002
Figure PCTCN2016072029-appb-000003
Figure PCTCN2016072029-appb-000003
通过以上介绍可知,CPU在对内存中的原始解码数据进行转换时会耗费大量的时间,占用大量的CPU资源,进而拖慢UI和整个系统的反应速度。As can be seen from the above description, the CPU spends a lot of time converting the original decoded data in the memory, consuming a large amount of CPU resources, thereby slowing down the response speed of the UI and the entire system.
因此,本申请实施例的核心构思之一在于,通过调用与指定颜色相应的图形界面文本各像素点的内存数据表,实现由系统的硬件模块来完成原始解码数据的转换,进而展现具有指定颜色的图形界面文本,避免对CPU资源的占用。Therefore, one of the core concepts of the embodiments of the present application is that the memory data table of each pixel of the graphic interface text corresponding to the specified color is used to realize the conversion of the original decoded data by the hardware module of the system, thereby displaying the specified color. Graphical interface text to avoid occupation of CPU resources.
参照图2,示出了本申请的一种更改图形界面文本颜色的方法实施例的步骤流程图,具体可以包括如下步骤:Referring to FIG. 2, a flow chart of the steps of the method for changing the color of the graphic interface text of the present application is shown. Specifically, the method may include the following steps:
步骤101,接收针对图形界面文本的颜色更改请求;Step 101: Receive a color change request for the graphic interface text;
在本申请的一种实施例中,用户可以通过遥控器向电视机发送更改图形界面文本颜色的请求,该请求中包括需要更改的指定颜色的信息,比如,用户可以请求将图像界面文本由目前的黑色更改为红色。In an embodiment of the present application, the user may send a request for changing the color of the graphic interface text to the television through the remote controller, where the request includes information of a specified color that needs to be changed, for example, the user may request the image interface text from the current The black color changes to red.
步骤102,依据所述请求,获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表;Step 102: Acquire, according to the request, an in-memory data table of each pixel of the graphic interface text corresponding to the specified color information;
根据用户的请求,可以首先获取与指定颜色信息相应的图形界面文本各像素点的内存数据表。比如,获取红色的图形界面文本各像素点的内存数据表。图形界面文本各像素点的内存数据表用来存放某种颜色的各像素点内存数据,每种颜色的图形界面文本各像素点的内存数据表包括256个像素点内存数据,表示该颜色格式下真实的颜色数据。参照图3和图4, 分别示出了ARGB格式下红色和紫色的图形界面文本各像素点的内存数据表的示意图。According to the user's request, the memory data table of each pixel of the graphic interface text corresponding to the specified color information may be first acquired. For example, to obtain a memory data table for each pixel of the red graphical interface text. Graphical interface text The memory data table of each pixel is used to store the memory data of each pixel of a certain color. The memory data table of each pixel of each color graphic interface data includes 256 pixel memory data, indicating the color format. True color data. Referring to Figures 3 and 4, A schematic diagram of an in-memory data table for each pixel of the red and purple graphical interface text in the ARGB format is shown.
在本申请的一种优选实施例中,图形界面文本各像素点的内存数据表可以通过如下方式获取:In a preferred embodiment of the present application, the memory data table of each pixel of the graphic interface text can be obtained as follows:
依据所述请求,从预置的颜色数据库中获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表。And according to the request, an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information is acquired from a preset color database.
在具体实现中,可以提前在系统的颜色数据库中预置与某一种或某几种颜色信息相应的图形界面文本各像素点的内存数据表。比如,可以提前将红色的图形界面文本各像素点的内存数据表预置在颜色数据库,当接收到需要将图形界面文本的颜色更改为红色的请求时,可以直接从颜色数据库中提取出红色的图形界面文本各像素点的内存数据表。In a specific implementation, the memory data table of each pixel of the graphic interface text corresponding to a certain one or a plurality of color information may be preset in the color database of the system. For example, the memory data table of each pixel of the red graphic interface text can be preset in the color database in advance. When receiving the request to change the color of the graphic interface text to red, the red color can be directly extracted from the color database. The memory data table of each pixel of the graphic interface text.
但是,由于无法将所有颜色的图形界面文本各像素点的内存数据表都提前预置在颜色数据库中,因此,在本申请的另一种优选实施例中,图形界面文本各像素点的内存数据表还可以通过如下方式获取:However, since the memory data table of each pixel of the graphic interface text of all colors cannot be preset in the color database, in another preferred embodiment of the present application, the memory data of each pixel of the graphic interface text is The table can also be obtained as follows:
依据所述请求,输入所述指定颜色的RGB值;Inputting the RGB value of the specified color according to the request;
依据所述指定颜色的RGB值,计算出所述指定颜色的图形界面文本各像素点的内存数据,形成内存数据表。Calculating the memory data of each pixel of the graphic interface text of the specified color according to the RGB value of the specified color to form an in-memory data table.
当用户需要将文本颜色由当前颜色更改为另一种颜色时,如果该颜色的图形界面文本各像素点的内存数据表并没有提前预置的颜色数据库中,用户可以首先输入该颜色的RGB值。在具体实现中,如果用户希望将文本颜色更改为浅紫色,则可以输入浅紫色对应的RGB值(203,137,203),或者,用户也可以直接输入与浅紫色的十进制RGB值(203,137,203)对应的十六进制的值(0xcb,0x89,0xcb)。When the user needs to change the text color from the current color to another color, if the memory data table of each color point of the graphic interface text of the color is not preset in the color database, the user may first input the RGB value of the color. . In the specific implementation, if the user wants to change the text color to light purple, the RGB value corresponding to light purple (203, 137, 203) may be input, or the user may directly input the decimal RGB value with light purple (203, 137, 203) The corresponding hexadecimal value (0xcb, 0x89, 0xcb).
当用户输入该颜色的RGB值后,在本申请的一种优选实施例中,可以依据输入的RGB值,计算出与该RGB值对应的颜色的图形界面文本各像素点的内存数据,形成内存数据表。当用户输入的RGB值为(203,137,203)后,则可以计算出浅紫色的图形界面文本各像素点的内存数据,形成内存数据表。After the user inputs the RGB value of the color, in a preferred embodiment of the present application, the memory data of each pixel of the graphic interface text corresponding to the RGB value may be calculated according to the input RGB value to form a memory. data sheet. When the RGB value input by the user is (203, 137, 203), the memory data of each pixel of the light purple graphic interface text can be calculated to form an in-memory data table.
步骤103,从所述内存数据表中,查找出与所述图形界面文本的原始 解码数据匹配的像素点内存数据; Step 103, from the memory data table, find out the original text with the graphic interface Decoding data matching pixel point memory data;
在获取指定颜色的图形界面文本各像素点的内存数据表后,可以从该内存数据表中,查找出与图形界面文本的原始解码数据相匹配的像素点内存数据。After obtaining the memory data table of each pixel of the graphic interface text of the specified color, the pixel data of the pixel corresponding to the original decoded data of the graphic interface text can be found from the memory data table.
在本申请的一种优选实施例中,所述从所述内存数据表中,查找出与所述图形界面文本的原始解码数据匹配的像素点内存数据的子步骤可以包括:In a preferred embodiment of the present application, the sub-step of searching, from the in-memory data table, the pixel-point memory data that matches the original decoded data of the graphic interface text may include:
子步骤S1031,遍历所述图形界面文本的原始解码数据;Sub-step S1031, traversing the original decoded data of the graphic interface text;
子步骤S1032,在所述内存数据表中,逐个查找出与所述图形界面文本的原始解码数据一一对应的像素点内存数据;Sub-step S1032, in the memory data table, search for pixel point memory data corresponding to the original decoded data of the graphic interface text one by one;
子步骤S1033,将所述图形界面文本的原始解码数据逐个替换为所述像素点内存数据。Sub-step S1033, the original decoded data of the graphic interface text is replaced one by one with the pixel point memory data.
在具体实现中,可以逐个读取需要更改颜色的文本的原始解码数据,从指定颜色的图形界面文本各像素点的内存数据表中查找出与原始解码数据一一对应的像素点内存数据,将原始解码数据逐个替换为像素点内存数据。In a specific implementation, the original decoded data of the text whose color needs to be changed may be read one by one, and the pixel data corresponding to the original decoded data is searched from the memory data table of each pixel of the graphic interface text of the specified color, and The original decoded data is replaced with pixel point memory data one by one.
比如,将数字“1”更改为红色,则首先逐个读取表1中的原始解码数据,在红色的图形界面文本各像素点的内存数据表中查找出与原始解码数据一一对应的像素点内存数据,用查找出的像素点内存数据替换掉原始解码数据。For example, if the number "1" is changed to red, the original decoded data in Table 1 is first read one by one, and the pixel points corresponding to the original decoded data are found in the memory data table of each pixel of the red graphic interface text. Memory data, replacing the original decoded data with the found pixel memory data.
读取原始解码数据中的第1个值,为0x00,然后从红色的图形界面文本各像素点的内存数据表中查找出对应的像素点内存数据,为0x00000000,则用0x00000000替换掉原始解码数据0x00。Read the first value in the original decoded data, which is 0x00, and then find the corresponding pixel memory data from the memory data table of each pixel of the red graphic interface text, which is 0x00000000, and replace the original decoded data with 0x00000000 0x00.
然后,读取原始解码数据中的第2个值,为0x00,从红色的图形界面文本各像素点的内存数据表中查找出对应的像素点内存数据,为0x00000000,则用0x00000000替换掉原始解码数据0x00。Then, the second value in the original decoded data is read as 0x00, and the corresponding pixel memory data is found from the memory data table of each pixel of the red graphic interface text, and is 0x00000000, and the original decoding is replaced by 0x00000000. Data 0x00.
当读取到原始解码数据中的第19个值时,为0x80,则从红色的图形界面文本各像素点的内存数据表中查找出对应的像素点内存数据,为0x80654465,用0x80654465替换掉原始解码数据0x80。 When the 19th value in the original decoded data is read, it is 0x80, and the corresponding pixel memory data is found from the memory data table of each pixel of the red graphic interface text, which is 0x80654465, and the original is replaced by 0x80654465. Decode data 0x80.
当读取到原始解码数据中的第67个值时,为0xfa,则从红色的图形界面文本各像素点的内存数据表中查找出对应的像素点内存数据,为0xfafa0000,用0xfafa0000替换掉原始解码数据0xfa。When the 67th value in the original decoded data is read, it is 0xfa, and the corresponding pixel memory data is found from the memory data table of each pixel of the red graphic interface text, which is 0xfafa0000, and the original is replaced by 0xfafa0000. Decode data 0xfa.
当读取到原始解码数据中的第68个值时,为0xff,则从红色的图形界面文本各像素点的内存数据表中查找出对应的像素点内存数据,为0xffff0000,用0xffff0000替换掉原始解码数据0xff。When the 68th value in the original decoded data is read, it is 0xff, and the corresponding pixel memory data is found from the memory data table of each pixel of the red graphic interface text, which is 0xffff0000, and the original is replaced by 0xffff0000. Decode data 0xff.
当读取到原始解码数据中的第80个值时,为0x00,则从红色的图形界面文本各像素点的内存数据表中查找出对应的像素点内存数据,为0x00000000,,用0x00000000,替换掉原始解码数据0x00。When the 80th value in the original decoded data is read, it is 0x00, and the corresponding pixel memory data is found from the memory data table of each pixel of the red graphic interface text, which is 0x00000000, and is replaced by 0x00000000. The original decoded data is 0x00.
直到将所有原始解码数据均替换完成。Until all the original decoded data is replaced.
步骤104,采用所述像素点内存数据展现具有所述指定颜色的图形界面文本。Step 104: Display the graphic interface text having the specified color by using the pixel point memory data.
当按照步骤103中的方式,将图形界面文本的全部原始解码数据都替换成指定颜色的像素点内存数据后,则可以采用像素点内存数据展现具有指定颜色的图形界面文本。When all the original decoded data of the graphic interface text is replaced with the pixel point memory data of the specified color in the manner of step 103, the pixel interface memory data can be used to display the graphic interface text having the specified color.
在本申请的实施例中,通过获取与指定颜色信息相应的图形界面文本各像素点的内存数据表,然后从该内存数据表中,查找出与图形界面文本的原始解码数据匹配的像素点内存数据,采用像素点内存数据展现具有指定颜色的图形界面文本,使得对原始解码数据的转换可以由硬件模块直接读取内存数据表来完成,无需通过CPU进行逐点转换,解决了目前更改图形界面文本颜色耗费大量时间且占用CPU资源过多的问题。In the embodiment of the present application, the memory data table of each pixel of the graphic interface text corresponding to the specified color information is obtained, and then the pixel point memory matching the original decoded data of the graphic interface text is found from the memory data table. Data, using pixel point memory data to display the graphic interface text with the specified color, so that the conversion of the original decoded data can be directly read by the hardware module to complete the memory data table, without the need for point-by-point conversion by the CPU, solving the current change graphical interface Text color takes a lot of time and takes up too much CPU resources.
作为本申请的一种实施例,在颜色数据库中提前预置有多种颜色的内存数据表时,如果需要将图形界面文本由当前颜色更改为另一种颜色,可以将指向当前颜色内存数据表地址的指针指向需要更改颜色的内存数据表地址即可。As an embodiment of the present application, when the memory data table of multiple colors is preset in the color database, if the graphic interface text needs to be changed from the current color to another color, the current color memory data table may be pointed to The pointer to the address points to the address of the in-memory data table whose color needs to be changed.
比如,在颜色数据库中提前预置有红色和绿色的内存数据表的情况下,如果要将当前文本的显示颜色更改为红色,则在接收到针对图形界面文本的颜色更改请求后,获取颜色数据库中预置的红色的内存数据表,按 照实施例一中的方式,替换原始解码数据,使图形界面文本展现红色。进一步地,如果用户需要将红色文本更改为绿色,则系统在接收到更改请求后,可以将指向红色内存数据表地址的指针指向绿色的内存数据表地址,然后依次读取原始解码数据中的值,从绿色的内存数据表中,查找出与原始解码数据一一对应的像素点内存数据,用查找出的像素点内存数据替换掉原始解码数据后,则可以展现绿色的图形界面文本。For example, if the red and green memory data tables are pre-preset in the color database, if the display color of the current text is to be changed to red, the color database is acquired after receiving the color change request for the graphic interface text. Pre-set red memory data table, press In the manner of the first embodiment, the original decoded data is replaced, so that the graphical interface text is displayed in red. Further, if the user needs to change the red text to green, after receiving the change request, the system may point the pointer to the address of the red memory data table to the address of the green memory data table, and then read the values in the original decoded data in turn. From the green memory data table, find the pixel point memory data corresponding to the original decoded data one by one, and replace the original decoded data with the found pixel point memory data, then the green graphic interface text can be displayed.
在本实施例中,从绿色的内存数据表中,查找出与图形界面文本的原始解码数据匹配的像素点内存数据的步骤与步骤103类似,本实施例对此不再赘述。In this embodiment, the step of finding the pixel point memory data that matches the original decoded data of the graphic interface text from the green memory data table is similar to the step 103, which is not described in this embodiment.
作为本申请的另一种实施例,用户可以根据各自的偏好,将图形界面文本更改为任意颜色。As another embodiment of the present application, the user can change the graphical interface text to any color according to their respective preferences.
比如,如果用户希望将文本颜色更改为浅紫色,但颜色数据库中并没有提前预置浅紫色的内存数据表,此时用户可以直接输入浅紫色的RGB值(203,137,203),以该RGB值计算出浅紫色的图形界面文本各像素点的内存数据,形成内存数据表。然后,依次读取原始解码数据中的值,从计算出的浅紫色的内存数据表中,查找出与原始解码数据一一对应的像素点内存数据,用查找出的像素点内存数据替换掉原始解码数据后,则可以展现浅紫色的图形界面文本。For example, if the user wants to change the text color to light purple, but the color database does not preset the light purple memory data table in advance, the user can directly input the light purple RGB value (203, 137, 203) to The RGB value calculates the memory data of each pixel of the light purple graphic interface text to form an in-memory data table. Then, the values in the original decoded data are sequentially read, and the pixel data corresponding to the original decoded data is searched out from the calculated light purple memory data table, and the original pixel data is used to replace the original data. After decoding the data, you can display the light purple graphic interface text.
在本实施例中,从浅紫色的内存数据表中,查找出与图形界面文本的原始解码数据匹配的像素点内存数据的步骤与步骤103类似,本实施例对此不再赘述。In this embodiment, the step of finding the pixel point memory data matching the original decoded data of the graphic interface text from the light purple memory data table is similar to the step 103, which is not described in this embodiment.
作为本申请的又一种实施例,还可以实现图形界面文本的彩色显示。As still another embodiment of the present application, color display of graphical interface text can also be implemented.
如果用户希望将一句话的每个字分别用不同的颜色显示,则可以分别对每一个字调用颜色数据库中的不同颜色的内存数据表。比如,可以获取红色的内存数据表,将第一个字的原始解码数据替换为红色的像素点内存数据,使第一个字显示为红色;将指向红色内存数据表地址的指针指向绿色的内存数据表地址,将第二个字的原始解码数据替换为绿色的像素点内 存数据,使第二个字显示为绿色;然后将指向绿色内存数据表地址的指针指向紫色的内存数据表地址,将第三个字的原始解码数据替换为紫色的像素点内存数据,使第三个字显示为紫色,从而实现图形界面文本的彩色显示。If the user wishes to display each word of a sentence in a different color, the memory data table of different colors in the color database can be called separately for each word. For example, you can get the red memory data table, replace the original decoded data of the first word with the red pixel memory data, so that the first word is displayed in red; the pointer to the red memory data table address points to the green memory. Data table address, replacing the original decoded data of the second word with a green pixel Save the data so that the second word is displayed in green; then point the pointer to the green memory data table address to the purple memory data table address, and replace the original decoded data of the third word with the purple pixel memory data, so that The three words are displayed in purple for a color display of the graphical interface text.
在本实施例中,从各种颜色的内存数据表中,查找出与图形界面文本的原始解码数据匹配的像素点内存数据的步骤与步骤103类似,本实施例对此不再赘述。In this embodiment, the step of searching for the pixel point memory data matching the original decoded data of the graphic interface text is similar to the step 103 in the memory data table of the various colors, which is not described in this embodiment.
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。It should be noted that, for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the embodiments of the present application are not limited by the described action sequence, because In accordance with embodiments of the present application, certain steps may be performed in other sequences or concurrently. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required in the embodiments of the present application.
参照图5,示出了本申请的一种更改图形界面文本颜色的装置实施例的结构框图,具体可以包括如下模块:Referring to FIG. 5, a structural block diagram of an apparatus embodiment for changing the color of a graphical interface text according to the present application is shown. Specifically, the following modules may be included:
颜色更改请求接收模块201,用于接收针对图形界面文本的颜色更改请求,所述请求中包括指定颜色的信息;a color change request receiving module 201, configured to receive a color change request for the graphic interface text, where the request includes information specifying a color;
内存数据表获取模块202,用于依据所述请求,获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表;The memory data table obtaining module 202 is configured to acquire, according to the request, an in-memory data table of each pixel of the graphic interface text corresponding to the specified color information;
像素点内存数据查找模块203,用于从所述内存数据表中,查找出与所述图形界面文本的原始解码数据匹配的像素点内存数据;a pixel point data search module 203, configured to search, from the memory data table, pixel point memory data that matches original decoded data of the graphic interface text;
图形界面文本展现模块204,用于采用所述像素点内存数据展现具有所述指定颜色的图形界面文本。The graphical interface text presentation module 204 is configured to display the graphical interface text having the specified color by using the pixel point memory data.
在本申请的一种优选实施例中,所述内存数据表获取模块202可以包括如下子模块:In a preferred embodiment of the present application, the in-memory data table obtaining module 202 may include the following sub-modules:
预置内存数据表获取子模块2021,用于依据所述请求,从预置的颜色数据库中获取与所述指定颜色信息相应的图形界面文本各像素点的内存 数据表。a preset memory data table obtaining sub-module 2021, configured to acquire, according to the request, a memory of each pixel of the graphic interface text corresponding to the specified color information from a preset color database data sheet.
在本申请的另一种优选实施例中,所述内存数据表获取模块202还可以包括如下子模块:In another preferred embodiment of the present application, the in-memory data table obtaining module 202 may further include the following sub-modules:
RGB值输入子模块2022,用于依据所述请求,输入所述指定颜色的RGB值;An RGB value input sub-module 2022, configured to input an RGB value of the specified color according to the request;
内存数据表计算子模块2023,用于依据所述指定颜色的RGB值,计算出所述指定颜色的图形界面文本各像素点的内存数据,形成内存数据表。The memory data table calculation sub-module 2023 is configured to calculate memory data of each pixel point of the graphic interface text of the specified color according to the RGB value of the specified color, to form an in-memory data table.
在本申请的一种优选实施例中,所述像素点内存数据查找模块203可以包括如下子模块:In a preferred embodiment of the present application, the pixel point memory data lookup module 203 may include the following submodules:
原始解码数据遍历子模块2031,用于遍历所述图形界面文本的原始解码数据;The original decoded data traversal sub-module 2031 is configured to traverse the original decoded data of the graphic interface text;
像素点内存数据查找子模块2032,用于在所述内存数据表中,逐个查找出与所述图形界面文本的原始解码数据一一对应的像素点内存数据;a pixel point data search sub-module 2032, configured to search, in the memory data table, pixel point memory data corresponding to the original decoded data of the graphic interface text one by one;
像素点内存数据替换子模块2033,用于将所述图形界面文本的原始解码数据逐个替换为所述像素点内存数据。The pixel point memory data replacement sub-module 2033 is configured to replace the original decoded data of the graphic interface text one by one with the pixel point memory data.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用 计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to the general purpose A processor of a computer, special purpose computer, embedded processor or other programmable data processing terminal device to generate a machine such that instructions executed by a processor of a computer or other programmable data processing terminal device are generated for implementation in a flowchart A device of a process or a plurality of processes and/or block diagrams of a function specified in a block or blocks.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device such that a series of operational steps are performed on the computer or other programmable terminal device to produce computer-implemented processing, such that the computer or other programmable terminal device The instructions executed above provide steps for implementing the functions specified in one or more blocks of the flowchart or in a block or blocks of the flowchart.
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。While a preferred embodiment of the embodiments of the present application has been described, those skilled in the art can make further changes and modifications to the embodiments once they are aware of the basic inventive concept. Therefore, the appended claims are intended to be interpreted as including all the modifications and the modifications
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should also be noted that in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities. There is any such actual relationship or order between operations. Furthermore, the terms "comprises" or "comprising" or "comprising" or any other variations are intended to encompass a non-exclusive inclusion, such that a process, method, article, or terminal device that includes a plurality of elements includes not only those elements but also Other elements that are included, or include elements inherent to such a process, method, article, or terminal device. An element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that comprises the element, without further limitation.
以上对本申请所提供的一种更改图形界面文本颜色的方法和一种更改图形界面文本颜色的装置,进行了详细介绍,本文中应用了具体个例对 本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。 The above provides a method for changing the color of the graphical interface text and a device for changing the color of the graphical interface text, and a specific example is applied in this paper. The principles and embodiments of the present application are described. The description of the above embodiments is only for helping to understand the method of the present application and its core ideas. Meanwhile, for those skilled in the art, according to the idea of the present application, There is a change in the scope of application, and the contents of this specification should not be construed as limiting the application.

Claims (8)

  1. 一种更改图形界面文本颜色的方法,其特征在于,所述图形界面文本具有原始解码数据,所述方法包括:A method for changing a text color of a graphical interface, wherein the graphical interface text has original decoded data, the method comprising:
    接收针对图形界面文本的颜色更改请求,所述请求中包括指定颜色的信息;Receiving a color change request for the graphical interface text, the request including information specifying a color;
    依据所述请求,获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表;Acquiring, according to the request, an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information;
    从所述内存数据表中,查找出与所述图形界面文本的原始解码数据匹配的像素点内存数据;From the memory data table, finding pixel point memory data that matches original decoded data of the graphic interface text;
    采用所述像素点内存数据展现具有所述指定颜色的图形界面文本。The graphical interface text having the specified color is presented using the pixel point memory data.
  2. 根据权利要求1所述的方法,其特征在于,所述依据所述请求,获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表的步骤包括:The method according to claim 1, wherein the step of acquiring an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information according to the request comprises:
    依据所述请求,从预置的颜色数据库中获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表。And according to the request, an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information is acquired from a preset color database.
  3. 根据权利要求1所述的方法,其特征在于,所述依据所述请求,获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表的步骤包括:The method according to claim 1, wherein the step of acquiring an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information according to the request comprises:
    依据所述请求,输入所述指定颜色的RGB值;Inputting the RGB value of the specified color according to the request;
    依据所述指定颜色的RGB值,计算出所述指定颜色的图形界面文本各像素点的内存数据,形成内存数据表。Calculating the memory data of each pixel of the graphic interface text of the specified color according to the RGB value of the specified color to form an in-memory data table.
  4. 根据权利要求1或2或3所述的方法,其特征在于,所述从所述内存数据表中,查找出与所述图形界面文本的原始解码数据匹配的像素点内存数据的步骤包括:The method according to claim 1 or 2 or 3, wherein the step of searching for pixel point memory data matching the original decoded data of the graphic interface text from the in-memory data table comprises:
    遍历所述图形界面文本的原始解码数据;Traversing raw decoded data of the graphical interface text;
    在所述内存数据表中,逐个查找出与所述图形界面文本的原始解码数据一一对应的像素点内存数据;In the memory data table, pixel point memory data corresponding to the original decoded data of the graphic interface text is searched one by one;
    将所述图形界面文本的原始解码数据逐个替换为所述像素点内 存数据。Substituting the original decoded data of the graphic interface text one by one into the pixel Save data.
  5. 一种更改图形界面文本颜色的装置,其特征在于,所述图形界面文本具有原始解码数据,所述装置包括:An apparatus for changing a text color of a graphical interface, wherein the graphical interface text has original decoded data, and the apparatus comprises:
    颜色更改请求接收模块,用于接收针对图形界面文本的颜色更改请求,所述请求中包括指定颜色的信息;a color change request receiving module, configured to receive a color change request for the graphic interface text, where the request includes information of a specified color;
    内存数据表获取模块,用于依据所述请求,获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表;An in-memory data table obtaining module, configured to acquire, according to the request, an in-memory data table of each pixel of the graphic interface text corresponding to the specified color information;
    像素点内存数据查找模块,用于从所述内存数据表中,查找出与所述图形界面文本的原始解码数据匹配的像素点内存数据;a pixel point data search module, configured to search, from the memory data table, pixel point memory data that matches original decoded data of the graphic interface text;
    图形界面文本展现模块,用于采用所述像素点内存数据展现具有所述指定颜色的图形界面文本。A graphical interface text presentation module for presenting graphical interface text having the specified color using the pixel point memory data.
  6. 根据权利要求5所述的装置,其特征在于,所述内存数据表获取模块包括:The device according to claim 5, wherein the memory data table obtaining module comprises:
    预置内存数据表获取子模块,用于依据所述请求,从预置的颜色数据库中获取与所述指定颜色信息相应的图形界面文本各像素点的内存数据表。And a preset memory data table obtaining sub-module, configured to acquire, from the preset color database, an in-memory data table of each pixel point of the graphic interface text corresponding to the specified color information according to the request.
  7. 根据权利要求5所述的装置,其特征在于,所述内存数据表获取模块包括:The device according to claim 5, wherein the memory data table obtaining module comprises:
    RGB值输入子模块,用于依据所述请求,输入所述指定颜色的RGB值;An RGB value input submodule, configured to input an RGB value of the specified color according to the request;
    内存数据表计算子模块,用于依据所述指定颜色的RGB值,计算出所述指定颜色的图形界面文本各像素点的内存数据,形成内存数据表。The memory data table calculation sub-module is configured to calculate memory data of each pixel point of the graphic interface text of the specified color according to the RGB value of the specified color, to form an in-memory data table.
  8. 根据权利要求5或6或7所述的装置,其特征在于,所述像素点内存数据查找模块包括:The device according to claim 5 or 6 or 7, wherein the pixel point memory data search module comprises:
    原始解码数据遍历子模块,用于遍历所述图形界面文本的原始解码数据;The original decoded data traversal submodule is configured to traverse the original decoded data of the graphic interface text;
    像素点内存数据查找子模块,用于在所述内存数据表中,逐个查 找出与所述图形界面文本的原始解码数据一一对应的像素点内存数据;a pixel point memory data search submodule for checking one by one in the memory data table Finding pixel point memory data corresponding to the original decoded data of the graphic interface text;
    像素点内存数据替换子模块,用于将所述图形界面文本的原始解码数据逐个替换为所述像素点内存数据。 And a pixel point memory data replacement submodule, configured to replace the original decoded data of the graphic interface text one by one with the pixel point memory data.
PCT/CN2016/072029 2015-10-08 2016-01-25 Method and apparatus for changing text colour of graphical interface WO2017059651A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510646394.2A CN106569757A (en) 2015-10-08 2015-10-08 Method and device for changing color of graphical interface text
CN201510646394.2 2015-10-08

Publications (1)

Publication Number Publication Date
WO2017059651A1 true WO2017059651A1 (en) 2017-04-13

Family

ID=58487305

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/072029 WO2017059651A1 (en) 2015-10-08 2016-01-25 Method and apparatus for changing text colour of graphical interface

Country Status (2)

Country Link
CN (1) CN106569757A (en)
WO (1) WO2017059651A1 (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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1798289A (en) * 2004-12-30 2006-07-05 厦门华侨电子企业有限公司 Method for displaying OSD menu of TV set
CN101052107A (en) * 2006-04-04 2007-10-10 康佳集团股份有限公司 Switching circuit for TV menu skin color
CN101312511A (en) * 2007-05-22 2008-11-26 深圳Tcl新技术有限公司 Method and system for setting appearance of OSD menu of display
EP2076031A1 (en) * 2007-12-28 2009-07-01 Vestel Elektronik Sanayi ve Ticaret A.S. Dynamic-colored user menu for display systems
CN101827233A (en) * 2009-12-31 2010-09-08 康佳集团股份有限公司 Method for converting display colors of television menu based on alpha value and television thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101365082A (en) * 2008-10-08 2009-02-11 南京邮电大学 Set-top box on screen display system implementing method based on peer-to-peer computing technique
CN102169423B (en) * 2010-02-26 2013-03-27 腾讯科技(北京)有限公司 Method and system for displaying characters
CN101833542B (en) * 2010-04-21 2013-03-20 中兴通讯股份有限公司 Method and device for rendering fonts of user interface
CN103259989B (en) * 2012-02-17 2018-08-14 中兴通讯股份有限公司 The display methods and device of screen content
CN102799436B (en) * 2012-07-16 2015-06-10 蔡远文 Memory mapping based method for quickly displaying and processing multiple bitmaps

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1798289A (en) * 2004-12-30 2006-07-05 厦门华侨电子企业有限公司 Method for displaying OSD menu of TV set
CN101052107A (en) * 2006-04-04 2007-10-10 康佳集团股份有限公司 Switching circuit for TV menu skin color
CN101312511A (en) * 2007-05-22 2008-11-26 深圳Tcl新技术有限公司 Method and system for setting appearance of OSD menu of display
EP2076031A1 (en) * 2007-12-28 2009-07-01 Vestel Elektronik Sanayi ve Ticaret A.S. Dynamic-colored user menu for display systems
CN101827233A (en) * 2009-12-31 2010-09-08 康佳集团股份有限公司 Method for converting display colors of television menu based on alpha value and television thereof

Also Published As

Publication number Publication date
CN106569757A (en) 2017-04-19

Similar Documents

Publication Publication Date Title
US11470383B2 (en) Dynamic video overlays
WO2018107777A1 (en) Method and system for annotating video image
CN104010124A (en) Method and device for displaying filter effect, and mobile terminal
TWI547853B (en) System and method for displaying user interface
CN113742025A (en) Page generation method, device, equipment and storage medium
WO2023078284A1 (en) Image rendering method and apparatus, device, storage medium, and program product
WO2017059651A1 (en) Method and apparatus for changing text colour of graphical interface
US10402707B2 (en) Interactive optical code creation
CN110390919B (en) Display device and color processing method and device
JP2014071448A (en) Font generation system and method of display unit
JP6154545B2 (en) Information processing device
JP2014085716A (en) Image editing processing device and computer program
TW201431384A (en) Apparatus and method for processing image
CN114254610A (en) Slide processing method and device and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16852962

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16852962

Country of ref document: EP

Kind code of ref document: A1