CN102394053A - Method and device for displaying pure monochrome picture - Google Patents

Method and device for displaying pure monochrome picture Download PDF

Info

Publication number
CN102394053A
CN102394053A CN2011101658471A CN201110165847A CN102394053A CN 102394053 A CN102394053 A CN 102394053A CN 2011101658471 A CN2011101658471 A CN 2011101658471A CN 201110165847 A CN201110165847 A CN 201110165847A CN 102394053 A CN102394053 A CN 102394053A
Authority
CN
China
Prior art keywords
pure
image
picture
value
monochrome
Prior art date
Application number
CN2011101658471A
Other languages
Chinese (zh)
Other versions
CN102394053B (en
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 深圳市茁壮网络股份有限公司
Priority to CN 201110165847 priority Critical patent/CN102394053B/en
Publication of CN102394053A publication Critical patent/CN102394053A/en
Application granted granted Critical
Publication of CN102394053B publication Critical patent/CN102394053B/en

Links

Abstract

The invention discloses a method and a device for displaying a pure monochrome picture. The method comprises the following steps: decoding a picture which is to be displayed on a target area; judging if the picture is the pure monochrome picture according to a data of the picture after being decoded; and when the picture is the pure monochrome picture, calling a drawing module rectangular filling interface to fill the target area according to a pure monochrome color value. When the device provided by the embodiment of the invention is used for displaying the pure monochrome picture, a process of displaying one by one according to decoded pixels is unneeded and the drawing module rectangular filling interface is used for wholly filling the target area, thereby saving the time for displaying the pure monochrome picture.

Description

一种纯单色图片显示方法及装置 A pure monochromatic image display method and apparatus

技术领域 FIELD

[0001] 本申请涉及图像处理技术领域,特别是涉及一种纯单色图片显示方法及装置。 [0001] The present application relates to the technical field of image processing, and more particularly to a pure monochromatic image display method and apparatus. 背景技术 Background technique

[0002] 纯单色图片通常指整个图片的每个像素点的颜色均一样,通常纯单色图片作为背景进行显示。 [0002] Pure monochrome image generally refers to the color of each pixel in the entire image are the same, as the background image usually pure monochrome display. 现有技术中,显示纯单色图片和一般图片的过程一致,即将图片显示到目标区域时,都需要对原始图片进行解码,解码得到的位图数据由若干像素点组成,对于每一个像素点,根据坐标转换得到其在目标区域中的对应点,判断该像素点是否为透明的像素点,如果是透明的像素点,则保持目标区域中的对应点的颜色值,如果不是透明的像素点,则将目标区域中的对应点的颜色修改为该像素点的颜色值。 When the prior art, show a consistent picture of pure monochromatic pictures and general process, i.e. the target image display area, are to be decoded to the original image, the bitmap data obtained by decoding the plurality of pixel dots for each pixel , coordinate transformation to obtain the corresponding point in the target area based on determining whether the pixel is a transparent pixel, if the transparent pixel is maintained color values ​​of corresponding points in the target region, if not transparent pixel , the corresponding color point in the target region will modify the color value for the pixel.

[0003] 发明人在对现有技术的研究过程中发现,由于在将图片显示到目标区域的过程中,需要对解码后的每一个像素点进行判断,特别对于纯单色图片来说,其所有像素点都是同一个颜色,因此增加了显示时间,频繁的判断过程也将占用大量系统内存空间;当系统内存不足时,需要对图片进行回收,以释放解码图片占用的内存空间,但是当需要再次显示该图片时,则需要重新解码,当系统内存严重不足时,还需要释放图片的原始数据,导致当需要再次显示该图片时,需要重新加载图片并解码,因此难以使得内存空间得到充分释放。 [0003] In the course of the study the inventors found the prior art, since the displayed image to a target area, it is necessary for each pixel is determined after the decoding, in particular for a pure monochromatic image, its All pixels are the same color, thus increasing the display time, frequent judging process will also take up a lot of system memory space; when the system memory is low, you need to recover the picture, to free up memory space occupied by the decoded picture, but when To display the picture again, you need to re-decoding, when the system is a serious shortage of memory, but also the release of pictures of the original data, cause when you need to show again the picture, you need to reload the picture and decoding, it is difficult to make memory space is fully freed.

发明内容 SUMMARY

[0004] 本申请实施例提供了一种纯单色图片的显示方法及装置,以解决现有技术中显示纯单色图片时间长,且占用系统资源的问题。 Embodiment [0004] The present application provides a method for displaying a monochrome image of a pure and means to solve the prior art purely monochromatic display image for a long time, and occupies system resources problems.

[0005] 为了解决上述技术问题,本申请实施例公开了如下技术方案: [0005] To solve the above problems, the present embodiment discloses the following technical solutions:

[0006] 一种纯单色图片的显示方法,包括: [0006] A method of displaying pure monochrome image, comprising:

[0007] 对待显示到目标区域的图片进行解码; [0007] treat displayed picture decoding target area;

[0008] 根据解码后的图像数据判断所述图片是否为纯单色图片; [0008] The image data judging whether or not the decoded picture is a pure monochromatic image;

[0009] 当所述图片为纯单色图片时,调用绘图模块矩形填充接口按照所述纯单色颜色值对所述目标区域进行填充,完成对所述纯单色图片的显示。 [0009] When the picture is a monochromatic picture pure, filled rectangle drawing module call interface filling of the target region in accordance with said pure monochromatic color values, the display is completed pure monochromatic picture.

[0010] 所述根据解码后的图像数据判断所述图片是否为纯单色图片包括: [0010] The image data of the determination whether or not the decoded picture is a pure monochromatic image comprising:

[0011] 统计解码后的图像数据中的每个像素点的颜色值; [0011] The color value of each pixel of the decoded image data in statistics;

[0012] 当所述每个像素点的颜色值一致时,确定所述图片为纯单色图片。 [0012] When the color of each pixel of the same value, determining that the picture is a pure monochromatic image.

[0013] 所述调用绘图模块矩形填充接口按照所述纯单色颜色值对所述目标区域进行填充包括: [0013] filled rectangle drawing module the call interface comprises padding the target region according to the pure monochromatic color value:

[0014] 当按照所述图片的原始尺寸进行显示时,获取所述图片的宽度参数和高度参数; [0014] When displaying the picture with the original size, the picture width parameter acquiring and height parameters;

[0015] 根据所述宽度参数和高度参数计算用于表示所述目标区域的参数值; [0015] The parameters of the width and height parameters for calculating said parameter value representing the target area;

[0016] 将所述目标区域的参数值和所述纯单色颜色值作为所述绘图模块矩形填充接口的输入参数值,调用所述绘图模块矩形填充接口将所述纯单色颜色值填充到所述目标区域。 [0016] The parameter values ​​of the target area and the pure color value as the monochrome input parameter value drawing rectangle filling module interface, invoking the filled rectangle drawing module interfaces the pure color value is filled into monochrome the target area. [0017] 所述调用绘图模块矩形填充接口按照所述纯单色颜色值对所述目标区域进行填充包括: [0017] filled rectangle drawing module the call interface comprises padding the target region according to the pure monochromatic color value:

[0018] 当对所述图片进行放大后显示时,获取所述图片的宽度参数和高度参数,以及所述图片显示到所述目标区域的放大倍数; [0018] When displaying the picture after amplifying, obtaining the picture width and height parameters parameters, and to display the image magnification of the target area;

[0019] 根据所述放大倍数以及所述图片的宽度参数和高度参数计算用于表示所述目标区域的参数值; [0019] The height and width parameters of the parameter of the picture magnification and calculating a parameter value representing the target region;

[0020] 将所述目标区域的参数值和所述纯单色颜色值作为所述绘图模块矩形填充接口的输入参数值,调用所述绘图模块矩形填充接口将所述纯单色颜色值填充到所述目标区域。 [0020] The parameter values ​​of the target area and said monochrome pure color value as the input parameter value mapping module rectangle filling interface, invoking the filled rectangle drawing module interfaces the pure color value is filled into monochrome the target area.

[0021] 还包括: [0021] further comprises:

[0022] 当系统资源小于第一阈值时,释放所述纯单色图片解码后的图像数据所占用的系统内存,或者,当系统资源小于第二阈值时,释放所述纯单色图片占用的系统内存; [0022] When the system resources than the first threshold value, releasing the pure monochromatic image data decoded picture occupied by system memory, or, when the system resources are less than the second threshold value, to release the occupied pure monochromatic image system memory;

[0023] 在释放系统内存后,保存为所述纯单色图片设置的纯单色标识及所述纯单色图片的纯单色颜色值。 [0023] After releasing the system memory to save the identification of pure monochromatic color value and the pure pure monochromatic image the monochromatic image provided purely monochromatic.

[0024] 一种纯单色图片的显示装置,包括: [0024] a pure monochromatic picture display device, comprising:

[0025] 解码单元,用于对待显示到目标区域的图片进行解码; [0025] decoding unit for displaying pictures treat decoding target area;

[0026] 判断单元,用于根据解码后的图像数据判断所述图片是否为纯单色图片; [0026] determination means for determining whether the image data according to whether the decoded picture is a pure monochromatic image;

[0027] 显示单元,用于当所述判断单元判断所述图片为纯单色图片时,调用绘图模块矩形填充接口按照所述纯单色颜色值对所述目标区域进行填充,完成对所述纯单色图片的显 [0027] the display unit, when said determination means determines that the image is a monochrome image of pure, filled rectangle drawing module call interface filling of the target region in accordance with said pure monochromatic color value, the complete It was pure monochrome picture

7J\ ο 7J \ ο

[0028] 所述判断单元包括: [0028] The determination unit comprises:

[0029] 颜色值统计子单元,用于统计解码后的图像数据中的每个像素点的颜色值; [0029] Statistics subunit color value, a color value for each pixel of the decoded image data in statistics;

[0030] 纯单色图片确定子单元,用于当所述每个像素点的颜色值一致时,确定所述图片为纯单色图片。 [0030] The determination subunit pure monochrome image, for each pixel when the value of the same color, the picture is determined as a pure monochromatic image.

[0031] 所述显示单元包括: [0031] The display unit comprises:

[0032] 第一获取子单元,用于当按照所述图片的原始尺寸进行显示时,获取所述图片的宽度参数和高度参数; [0032] a first obtaining sub-unit, configured to, when displaying the picture with the original size, the picture acquired width and height parameters parameters;

[0033] 第一计算子单元,用于根据所述宽度参数和高度参数计算用于表示所述目标区域的参数值; [0033] a first calculating sub-unit, for calculating a parameter based on the width and height parameters for the parameter value representing the target area;

[0034] 第一调用填充子单元,用于将所述目标区域的参数值和所述纯单色颜色值作为所述绘图模块矩形填充接口的输入参数值,调用所述绘图模块矩形填充接口将所述纯单色颜色值填充到所述目标区域。 [0034] The first call padding sub-unit, parameter values ​​for the target area and said monochrome pure color value as the input parameter value drawing rectangle filling module interface, invoking the filled rectangle drawing module interface the pure monochromatic color values ​​to fill the target area.

[0035] 所述显示单元包括: [0035] The display unit comprises:

[0036] 第二获取子单元,用于当对所述图片进行放大后显示时,获取所述图片的宽度参数和高度参数,以及所述图片显示到所述目标区域的放大倍数; [0036] The second obtaining sub-unit, configured to, when displaying the image of said amplifying to obtain the parameters width and height of the image parameters, and to display the image magnification of the target area;

[0037] 第二计算子单元,用于根据所述放大倍数以及所述图片的宽度参数和高度参数计算用于表示所述目标区域的参数值; [0037] The second calculating sub-unit, according to the width and height parameters and parameters of the magnification of the image for calculating said parameter value representing the target area;

[0038] 第二调用填充子单元,用于将所述目标区域的参数值和所述纯单色颜色值作为所述绘图模块矩形填充接口的输入参数值,调用所述绘图模块矩形填充接口将所述纯单色颜色值填充到所述目标区域。 [0038] The second sub-unit is filled call, the parameter value for the target region and the pure color value as the monochrome input parameter value drawing rectangle filling module interface, invoking the filled rectangle drawing module interface the pure monochromatic color values ​​to fill the target area.

[0039] 还包括: [0039] further comprises:

[0040] 释放单元,用于当系统资源小于第一阈值时,释放所述纯单色图片解码后的图像数据所占用的系统内存,或者,当系统资源小于第二阈值时,释放所述纯单色图片占用的系统内存; [0040] The releasing unit, configured to, when the system resources than the first threshold value, to release the pure monochrome image data decoded image memory occupied by the system, or when system resources are less than the second threshold value, the release of the pure monochrome picture takes up more system memory;

[0041] 保存单元,用于在所述释放单元释放系统内存后,保存为所述纯单色图片设置的纯单色标识及所述纯单色图片的纯单色颜色值。 [0041] The storage unit, configured to, after the release unit releases the system memory to save the set to identify pure monochromatic pure monochromatic image the color value and the pure monochromatic pure monochromatic image.

[0042] 由上述实施例可以看出,本申请实施例中对待显示到目标区域的图片进行解码, 根据解码后的图像数据判断图片是否为纯单色图片,当图片为纯单色图片时,调用绘图模块矩形填充接口按照纯单色颜色值对目标区域进行填充。 [0042] As can be seen from the above embodiments, application of the present embodiment shown in the embodiment to treat the target area image is decoded, the decoded image according to whether the image data is determined pure monochrome image, when a monochrome image is pure image, filled rectangle drawing call interface module in accordance with a target area is filled pure monochromatic color value. 应用本申请实施例显示纯单色图片时,无需按照解码后的像素点逐一进行显示,而是通过调用绘图模块矩形填充接口对目标区域进行整体填充,因此节约了显示纯单色图片的时间;当系统内存不足时,只需要记录图片的纯单色标识和纯单色颜色值,当再次显示该图片时,则只需要再次调用绘图模块矩形填充接口按照所保存的纯单色颜色值进行填充即可,无需重新加载图片或者重新对图片进行解码,能够使内存空间得到充分的释放。 This application example shows application of pure monochrome image, one by one without follow decoded pixel display, but the interface of the target area is filled by filling the entire rectangle drawing module calls, thus saving the time display pure monochrome image; when the system memory is low, only pure monochromatic image to be recorded and identified pure monochrome color values, when the display image again, filled rectangle drawing module need only call the interface again and fills the pure color value stored monochrome without the need to reload or re-picture decode the picture, the memory space can be fully released.

附图说明 BRIEF DESCRIPTION

[0043] 为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。 [0043] In order to more clearly illustrate the technical solutions according to the prior art embodiment of the present application, the accompanying drawings briefly described embodiments or the prior art needed to be used in the following embodiments will be apparent to, those of ordinary the skilled person, without any creative effort, you can also obtain other drawings based on these drawings.

[0044] 图1为本申请纯单色图片的显示方法的第一实施例流程图; [0044] FIG pure monochromatic image display method of the present application, a first embodiment flowchart;

[0045] 图2A为本申请纯单色图片的显示方法的第二实施例流程图; Flowchart [0045] Figure 2A shows the monochromatic image approach with a second embodiment of the present disclosure;

[0046] 图2B为图2A实施例中一种图片显示示意图; [0046] FIG. 2B images of one embodiment of FIG. 2A shows a schematic view;

[0047] 图3A为本申请纯单色图片的显示方法的第三实施例流程图; [0047] FIG 3A shows a method of the present application pure monochromatic image according to a third embodiment of a flow diagram;

[0048] 图;3B为图3A实施例中一种图片显示示意图; [0048] FIG.; 3B picture of one embodiment of FIG. 3A shows a schematic embodiment;

[0049] 图4为本申请纯单色图片的显示装置的第一实施例框图; Example of a block diagram of a first embodiment of the display device [0049] FIG. 4 of the present application pure monochromatic image;

[0050] 图5为本申请纯单色图片的显示装置的第二实施例框图。 [0050] FIG. 5 is a block diagram of a second example of embodiment of the display device application pure monochrome image.

具体实施方式 Detailed ways

[0051] 本发明如下实施例提供了一种纯单色图片的显示方法及装置。 [0051] The following examples of the present invention provides a pure monochromatic image display method and apparatus. 当显示纯单色图片时,通过图形模块矩形接口对目标区域进行填充,节省了显示时间,降低了系统对资源的占用。 When pure monochrome display image, a target area by filling rectangular graphics module interfaces, the display saves time, reduces system resource occupation.

[0052] 为了使本技术领域的人员更好地理解本发明实施例中的技术方案,并使本发明实施例的上述目的、特征和优点能够更加明显易懂,下面结合附图对本发明实施例中技术方案作进一步详细的说明。 [0052] In order to make those skilled in the art better understand the technical solutions in the embodiments of the present invention, the above and other objects, features and advantages more apparent embodiment of the present invention, in conjunction with the accompanying drawings of the embodiments of the present invention technical solution will be further described in detail.

[0053] 参见图1,为本申请纯单色图片的显示方法的第一实施例流程图: Flow chart illustrating a first embodiment of a method [0053] Referring to Figure 1, the present application pure monochrome image:

[0054] 步骤101 :对待显示到目标区域的图片进行解码。 [0054] Step 101: the target image displayed on the treated area is decoded.

[0055] 在获取到待显示的图片后,对该图片进行保存并解码,生成解码后的图像数据。 [0055] After obtaining the image to be displayed, the stored picture and decoded to generate decoded image data. 原始图片和解码后的图像数据均需要占用系统内存。 Original picture and the image data are decoded take up system memory.

6[0056] 步骤102 :根据解码后的图像数据判断该图片是否为纯单色图片。 6 [0056] Step 102: The image data decoding judgment whether the image is a monochrome image pure.

[0057] 具体的,可以统计解码后的图像数据中的每个像素点的颜色值,如果当每个像素点的颜色值均一致,则可以确定该图片为纯单色图片。 [0057] Specifically, the statistics may be the color value of each pixel of the decoded image data, and if, when the color value of each pixel are consistent, it may be determined that the image is a monochrome image pure.

[0058] 步骤103 :当该图片为纯单色图片时,调用绘图模块矩形填充接口按照纯单色颜色值对目标区域进行填充,完成对纯单色图片的显示。 [0058] Step 103: When the image is purely monochromatic image, filled rectangle drawing module call interface according to the target area is filled pure monochrome color values, pure monochromatic display complete pictures.

[0059] 具体的,当按照图片的原始尺寸进行显示时,获取图片的宽度参数和高度参数,根据宽度参数和高度参数计算用于表示目标区域的参数值,将目标区域的参数值和纯单色颜色值作为绘图模块矩形填充接口的输入参数值,调用绘图模块矩形填充接口将纯单色颜色值填充到目标区域。 [0059] Specifically, when the display image with the original size, the acquired image width and height parameters parameters, width and height parameters according to the parameter calculation target region representing a parameter value, the parameter value of the target area and a pure single color color values ​​as input parameter values ​​rectangle drawing module interfaces filling, filled rectangle drawing module call interface pure monochrome color values ​​to fill the target area.

[0060] 当对图片进行放大后显示时,获取图片的宽度参数和高度参数,以及图片显示到目标区域的放大倍数,根据放大倍数以及图片的宽度参数和高度参数计算用于表示目标区域的参数值,将目标区域的参数值和纯单色颜色值作为绘图模块矩形填充接口的输入参数值,调用绘图模块矩形填充接口将纯单色颜色值填充到目标区域。 [0060] When the display of the enlarged image, the acquired image width and height parameters parameters, and to display the image magnification of the target area, and the magnification is calculated in accordance with the width and height parameters of the picture parameter parameter for indicating a target area value, the parameter value of the target region and the pure color value for a monochromatic filled rectangle drawing module interface input parameter values, filled rectangle drawing module call interface pure monochrome color values ​​to fill the target area.

[0061] 参见图2A,为本申请纯单色图片的显示方法的第二实施例流程图,该实施例以图片按照原始尺寸进行显示为例进行描述: A flowchart of the second embodiment [0061] Referring to Figure 2A, pure monochromatic image display method of the present application, the embodiments are described as an example display image to original size:

[0062] 步骤201 :对待显示到目标区域的图片进行解码。 [0062] Step 201: the target image displayed on the treated area is decoded.

[0063] 在对图片进行显示之前,必须先对其进行解码,解码的结果是一些位图数据,这些位图数据在计算机内部就对应一块内存。 [0063] Before displaying the picture must be decoded, the decoding result is some of the bitmap data, the bitmap data corresponding to an internal memory on the computer. 以ARGB8888颜色格式为例,需要用四个字节来描述一个像素点的信息,分别是alpha (透明位),red (红色),green (绿色),blue (蓝色), 图片解码后的图像数据所占内存大小满足下面的公式:解码数据所占内存大小=图片的宽X图片的高X每个像素点所需要的字节数,例如:对一张宽为25,高为35的图片,在ARGB8888颜色格式下,解码后的图像数据所占内存大小为:25X35X4 = 3500字节。 Example ARGB8888 in color format, four bytes need to describe information of a pixel, namely alpha (transparency bits), Red (red), Green (green), Blue (blue), the picture decoding image share data memory size satisfies the following formula: the number of bytes occupied by the memory size of the decoded data X = broad picture of high picture X each pixel required, for example: for a width 25 and height 35 of the image in ARGB8888 color format, image data of decoded occupied memory size: 25X35X4 = 3500 bytes.

[0064] 步骤202 :统计解码后的图像数据中的每个像素点的颜色值。 [0064] Step 202: the color value of each pixel of the decoded image data in statistics.

[0065] 对于解码后的图像数据中的每个像素点,可以分别比较每个像素点的同种类型的颜色信息,即统计所有像素点的red、green和blue的值是否一致。 [0065] For each pixel of the decoded image data can be respectively compared with the type of each pixel of color information, i.e. the statistics of all pixels red, green, and blue if the values ​​match.

[0066] 步骤203 :判断每个像素点的颜色值是否一致,若是,执行步骤204 ;否则,执行步骤207。 [0066] Step 203: determining whether the color value of each pixel of the same, if yes, perform step 204; otherwise, step 207 is executed.

[0067] 当所有像素点的red、green和blue的值都一致,则说明这些像素点的颜色值一致,相应的由这些像素点组成的图片为纯单色图片。 [0067] When all pixels of red, blue and Green values ​​are the same, the pixel color values ​​of these same instructions, the pixels corresponding to these dots pure monochromatic picture image.

[0068] 步骤204 :获取该图片的宽度参数和高度参数。 [0068] Step 204: Get the width and height parameters of the picture parameters.

[0069] 如图2B所示,为一种图片显示到屏幕上的显示示意图。 [0069] As shown in FIG. 2B, a schematic view of a display screen as a picture on the display. 其中,假设图片的宽为img_w,图片的高为img_h,假设屏幕的宽为screen^,屏幕的高为screenj!,假设需要将图片按原始尺寸显示到屏幕的点(χ,y)处,屏幕的原点为左上角,向右为χ轴正方向,向下为y轴正方向。 Wherein, assuming that a width of picture img_w, image height img_h, assuming the screen is wide screen ^, to screen high screenj !, Suppose you want to display images according to the original size of the screen points (χ, y), the screen origin the upper left corner, as right χ axis positive direction, the positive y-axis direction is downward. 则图片中每一个像素点都可以对应到屏幕中的相应点上,其对应关系如下表1 所示: Each of the image pixel may correspond to a respective spot on the screen, the corresponding relation shown in the following Table 1:

[0070] 表1 [0070] TABLE 1

[0071] [0071]

Figure CN102394053AD00081

[0072] 按照现有技术,需要对解码后的每个像素点的透明位进行判断,如果透明,则显示目标区域中对应点的颜色值,如果不透明,则将该像素点的颜色值显示到目标区域中对应点的位置上。 [0072] According to the prior art, the need for transparency of each pixel site decoded judgment, if transparent, the color values ​​of corresponding points in the target region is displayed, if not transparent, then the color value of the pixels to display target area corresponding to the position of a point. 由此可知,现有技术中需要对每个像素点进行判断,因此耗费大量时间。 It can be seen, the prior art needs to be determined for each pixel, and therefore time-consuming.

[0073] 本申请实施例中,由于调用绘图模块矩形填充接口,因此无需对每个像素点进行判断和填充,而是需要获得绘图模块矩形填充接口的输入参数,从而应用该接口直接对目标区域进行显示填充。 [0073] Application of the present embodiment, since the filled rectangle drawing module calls the interface, it is not necessary for each pixel and for determining the filling, but the input parameters need filled rectangle drawing module interface, to interface directly to the target application area display filling. 一般地,系统会提供绘图模块,该模块提供基本的绘图接口,包括画线、矩形填充、画圆等。 In general, the system provides a drawing module, which provides basic drawing interface, including drawing lines, filled rectangles, circle and the like. 不同的系统提供的接口可能存在细微差别,但一些关键参数是一致的,对于绘图模块矩形填充接口来说,其通用的形式可以表示如下: System provides different interfaces may be slight differences, but some of the key parameters is consistent, the interface for the mapping module filling rectangle, its generic form can be expressed as follows:

[0074] fill—rect(int χ, int y, int w, int h,unsigned int color) [0074] fill-rect (int χ, int y, int w, int h, unsigned int color)

[0075] 其中,fill_rect为接口名,表示是矩形填充接口,χ为矩形填充区域的左上角的横坐标,y为矩形区域左上角的纵坐标,w为矩形填充区域的高度,h为矩形填充区域的高度,color为填充的纯单色颜色值。 [0075] wherein, Fill Rect name for the interface, the interface represents a rectangle fill, [chi] is the upper left corner of the fill area abscissa, y coordinates for the upper left corner of the rectangular area vertical, w is the height of the rectangular region is filled, h is rectangle fill height of the region, color filled pure monochromatic color value.

[0076] 步骤205 :根据宽度参数和高度参数计算用于表示目标区域的参数值。 [0076] Step 205: the width and height parameters for the parameters calculated from the value of a parameter indicative of the target area.

[0077] 本实施例中图片按照原始尺寸进行显示,矩形填充区域的宽度和高度与图片的宽度和高度一致,因此根据步骤204中获得的图片的宽度和高度就可以得到目标区域的宽度和高度。 [0077] This width is the width and height of the image display, the rectangular fill area with the original size embodiment of image examples and highly consistent, so the width and height of the step 204 obtained in the image can be obtained the width and height of the target area .

[0078] 步骤206 :将目标区域的参数值和纯单色颜色值作为绘图模块矩形填充接口的输入参数值,调用绘图模块矩形填充接口将纯单色颜色值填充到目标区域,完成对纯单色图片的显示结束当前流程。 [0078] Step 206: The value of the parameter of the target region and the pure color value for a monochromatic filled rectangle drawing module interface input parameter values, filled rectangle drawing module call interface pure monochrome color values ​​to fill the target area, complete pure single color pictures show the end of the current process.

[0079]根据矩形填充接口的参数形式 fill_rect(int χ, int y,int w, int h,unsigned int color),输入参数中,图片按原始尺寸显示到屏幕的点(x,y)处,因此(x,y)对应上述参数中的χ和y,而图片的宽度和高度分别对应上述参数中的w和h,color即为图片的纯单色颜色值。 [0079] The parametric form fill_rect (int χ, int y, int w, int h, unsigned int color) rectangle filling interface, input parameters, images are displayed in an original size to a point of the screen (x, y), and are therefore (x, y) corresponding to the above parameter χ and y, width and height of the images respectively corresponding to the above-described parameters w and h, pure monochromatic color is the color value of the image.

[0080] 步骤207 :按照现有流程将图片显示到目标区域,结束当前流程。 [0080] Step 207: The image display according to the prior process to the target area, the current process ends.

[0081] 当每个像素点的颜色值是不一致时,说明该图片不是纯单色图片,因此按照现有技术,对解码后的每个像素点进行判断然后再显示。 [0081] When the color value of each pixel is not uniform, indicating that the picture is not purely monochromatic images, so according to the prior art, each pixel of the decoded and then displays the determination.

[0082] 参见图3A,为本申请纯单色图片的显示方法的第三实施例流程图,该实施例以图片按照放大后尺寸进行显示,以及对内存空间进行释放为例进行描述:[0083] 步骤301 :对待显示到目标区域的图片进行解码。 [0082] Referring to Figure 3A, pure monochromatic image display method of the present application is a flowchart of a third embodiment embodiment, this embodiment is to display the picture, and to release the memory space will be described as an example in accordance with its size enlarged to: [0083 ] step 301: treat to display images of the target area to be decoded.

[0084] 在对图片进行显示之前,必须先对其进行解码,解码的结果是一些位图数据,这些位图数据在计算机内部就对应一块内存。 [0084] Before displaying the picture must be decoded, the decoding result is some of the bitmap data, the bitmap data corresponding to an internal memory on the computer. 以ARGB8888颜色格式为例,需要用四个字节来描述一个像素点的信息,分别是alpha (透明位),red (红色),green (绿色),blue (蓝色), 图片解码后的图像数据所占内存大小满足下面的公式:解码数据所占内存大小=图片的宽X图片的高X每个像素点所需要的字节数,例如:对一张宽为25,高为35的图片,在ARGB8888颜色格式下,解码后的图像数据所占内存大小为:25X35X4 = 3500字节。 Example ARGB8888 in color format, four bytes need to describe information of a pixel, namely alpha (transparency bits), Red (red), Green (green), Blue (blue), the picture decoding image share data memory size satisfies the following formula: the number of bytes occupied by the memory size of the decoded data X = broad picture of high picture X each pixel required, for example: for a width 25 and height 35 of the image in ARGB8888 color format, image data of decoded occupied memory size: 25X35X4 = 3500 bytes.

[0085] 步骤302 :统计解码后的图像数据中的每个像素点的颜色值。 [0085] Step 302: the color value of each pixel of the decoded image data in statistics.

[0086] 对于解码后的图像数据中的每个像素点,可以分别比较每个像素点的同种类型的颜色信息,即统计所有像素点的red、green和blue的值是否一致。 [0086] For each pixel of the decoded image data can be respectively compared with the type of each pixel of color information, i.e. the statistics of all pixels red, green, and blue if the values ​​match.

[0087] 步骤303 :当每个像素点的颜色值一致时,确定图片为纯单色图片。 [0087] Step 303: when the color value of each pixel uniform, pure monochromatic picture image is determined.

[0088] 当所有像素点的red、green和blue的值都一致,则说明这些像素点的颜色值一致,相应的由这些像素点组成的图片为纯单色图片。 [0088] When all pixels of red, blue and Green values ​​are the same, the pixel color values ​​of these same instructions, the pixels corresponding to these dots pure monochromatic picture image.

[0089] 步骤304 :获取该图片的宽度参数和高度参数,以及图片显示到目标区域的放大倍数。 [0089] Step 304: acquiring the image width and height parameters parameters, and to display the image magnification of the target area.

[0090] 如图IBB所示,为另一种图片显示到屏幕上的显示示意图。 [0090] As shown in FIG IBB, it is another schematic view showing a picture displayed on the screen. 其中,假设图片的宽为img_w,图片的高为img_h,假设屏幕的宽为screen^,屏幕的高为screenj!,假设需要将图片按原始尺寸的二倍显示到屏幕的点(χ,y)处,屏幕的原点为左上角,向右为χ轴正方向, 向下为y轴正方向。 Wherein, assuming that a width of picture img_w, image height img_h, assuming the screen is wide screen ^, to screen high screenj !, Suppose you want to display images according to a point twice the original size of the screen (χ, y) origin at the upper left corner of the screen, to the right of χ-axis positive direction, the positive y-axis direction is downward. 由于图片的高度和宽度都放大二倍,因此原始图片中解码后的每个像素点都对应到屏幕中的四个点上,其对应关系如下表2所示: Since the height and width of the image are enlarged twice, each pixel of the original picture after decoding corresponds to four points on the screen, the corresponding relationship is shown in Table 2 below:

[0091]表 2 [0091] TABLE 2

[0092] [0092]

Figure CN102394053AD00091

[0093] [0093]

Figure CN102394053AD00101

[0094] 一般地,系统会提供绘图模块,该模块提供基本的绘图接口,包括画线、矩形填充、 画圆等。 [0094] In general, the system provides a drawing module, which provides basic drawing interface, including drawing lines, filled rectangles, circle and the like. 不同的系统提供的接口可能存在细微差别,但一些关键参数是一致的,对于绘图模块矩形填充接口来说,其通用的形式可以表示如下: System provides different interfaces may be slight differences, but some of the key parameters is consistent, the interface for the mapping module filling rectangle, its generic form can be expressed as follows:

[0095] fill—rect(int χ, int y, int w, int h,unsigned int color) [0095] fill-rect (int χ, int y, int w, int h, unsigned int color)

[0096] 其中,fill_rect为接口名,表示是矩形填充接口,χ为矩形填充区域的左上角的横坐标,y为矩形区域左上角的纵坐标,w为矩形填充区域的宽度,h为矩形填充区域的高度,color为填充的纯单色颜色值。 [0096] wherein, Fill Rect name for the interface, the interface represents a rectangle fill, [chi] is the upper left corner of the fill area abscissa, y coordinates for the upper left corner of the rectangular area vertical, w is the width of the rectangular filling region, h is rectangle fill height of the region, color filled pure monochromatic color value.

[0097] 步骤305 :根据放大倍数以及图片的宽度参数和高度参数计算用于表示目标区域的参数值。 [0097] Step 305: The width and height parameters and image magnification parameters for calculating the value of a parameter indicating the target area.

[0098] 本实施例中图片按照原始尺寸的二倍进行显示,矩形填充区域的宽度和高度分别是图片的宽度和高度的二倍,因此根据步骤304中获得的图片的宽度和高度就可以得到目标区域的宽度和高度。 [0098] In embodiment according to the present embodiment images for twice the original size of the display, the width and height of the rectangular area are filled twice the width and height of the image, thus can be obtained in accordance with the width and height of the image obtained in step 304 width and height of the target area.

[0099] 步骤306 :将目标区域的参数值和纯单色颜色值作为绘图模块矩形填充接口的输入参数值,调用绘图模块矩形填充接口将纯单色颜色值填充到目标区域,完成对纯单色图片的显示。 [0099] Step 306: The value of the parameter of the target region and the pure color value for a monochromatic filled rectangle drawing module interface input parameter values, filled rectangle drawing module call interface pure monochrome color values ​​to fill the target area, complete pure single display color images.

[0100]根据矩形填充接口的参数形式 fill_rect(int χ, int y,int w, int h,unsigned int color),输入参数中,图片按原始尺寸显示到屏幕的点(x,y)处,因此(x,y)对应上述参数中的χ和y,而图片的宽度的二倍和高度的二倍分别对应上述参数中的w和h,color即为图片的纯单色颜色值。 [0100] The parametric form fill_rect (int χ, int y, int w, int h, unsigned int color) rectangle filling interface, input parameters, images are displayed in an original size to a point of the screen (x, y), and are therefore (x, y) corresponding to the above parameter χ and y, but twice the width and twice the height of the picture respectively correspond to the above-described parameters w and h, pure monochromatic color is the color value of the image.

[0101] 步骤307 :判断系统资源是否小于阈值,若是,则执行步骤308 ;否则,结束流程。 [0101] Step 307: determining whether the system resources are less than a threshold, if yes, execute step 308; otherwise, the process ends.

[0102] 步骤308 :释放纯单色图片解码后的图像数据所占用的系统内存,或者释放纯单色图片占用的系统内存。 [0102] Step 308: the release of pure monochromatic image data decoded picture occupied by system memory, or a pure monochromatic image release system memory occupied.

[0103] 当系统内存小于第一阈值时,可以先释放纯单色图片加码后的图像数据所占用的系统内存,当系统内存小于第二阈值时,可以进一步释放纯单色图片占用的系统内存,其中第一阈值小于第二阈值。 [0103] When the system memory is less than a first threshold value, it is possible to release the pure monochrome image data coded image occupied by system memory, when the system memory is less than a second threshold value, pure monochromatic image can further release the memory occupied by the system wherein the first threshold is less than the second threshold value.

[0104] 步骤309 :保存为所述纯单色图片设置的纯单色标识及所述纯单色图片的纯单色颜色值,结束当前流程。 [0104] Step 309: the save as pure monochromatic image provided pure monochromatic color values ​​identifying the monochrome pure and pure monochrome picture, the current process ends.

[0105] 当系统内存不足时,只需要记录图片的纯单色标识和纯单色颜色值,当再次显示该图片时,则只需要再次调用绘图模块矩形填充接口按照所保存的纯单色颜色值进行填充即可,无需重新加载图片或者重新对图片进行解码,能够使内存空间得到充分的释放,因此适用于对同一张纯单色图片需要多次显示的应用场景中。 [0105] When the system memory is low, only pure monochromatic image to be recorded and identified pure monochrome color values, when the display image again, only need to call again a filled rectangle drawing module interfaces in accordance with the stored pure monochromatic color value can be filled without having to reload the picture or the picture decoding re-enables the memory space is fully released, and therefore suitable for the application of the same scene Iris Chang monochrome images require multiple displays.

[0106] 与本申请纯单色图片的显示方法的实施例相对应,本申请还提供了纯单色图片的显示装置的实施例。 Example [0106] The method of the present application and display pure monochromatic images corresponding to the embodiment, the present application further provides a pure monochromatic image display device.

[0107] 参见图4,为本申请纯单色图片的显示装置的第一实施例框图: A block diagram of a first embodiment of the display device [0107] Referring to Figure 4, the present application pure monochrome image:

[0108] 该装置包括:解码单元410、判断单元420和显示单元430。 [0108] The apparatus comprises: a decoding unit 410, determination unit 420 and a display unit 430.

[0109] 其中,解码单元410,用于对待显示到目标区域的图片进行解码; [0109] wherein, the decoding unit 410 for display to treat the target area image decoding;

[0110] 判断单元420,用于根据解码后的图像数据判断所述图片是否为纯单色图片; [0110] determination unit 420, whether pure monochromatic image is determined in accordance with the image data decoded picture;

[0111] 显示单元430,用于当所述判断单元420判断所述图片为纯单色图片时,调用绘图模块矩形填充接口按照所述纯单色颜色值对所述目标区域进行填充,完成对所述纯单色图片的显示。 [0111] the display unit 430, for, when the determining unit 420 determines the image is a monochrome image of pure, filled rectangle drawing module call interface of the target area is filled according to the value of pure monochromatic color, complete the pure monochrome picture display.

[0112] 参见图5,为本申请纯单色图片的显示装置的第二实施例框图: A block diagram of a second embodiment of the display device [0112] Referring to Figure 5, the present application pure monochrome image:

[0113] 该装置包括:解码单元510、判断单元520、显示单元530、释放单元540和保存单元550。 [0113] The apparatus comprises: a decoding unit 510, determination unit 520, a display unit 530, storage unit 540, and the release unit 550.

[0114] 其中,解码单元510,用于对待显示到目标区域的图片进行解码; [0114] wherein the decode unit 510, a display used to treat the target area to be decoded picture;

[0115] 判断单元520,用于根据解码后的图像数据判断所述图片是否为纯单色图片; [0115] determination unit 520, the image data for determining whether or not the decoded picture is a pure monochromatic image;

[0116] 显示单元530,用于当所述判断单元判断所述图片为纯单色图片时,调用绘图模块矩形填充接口按照所述纯单色颜色值对所述目标区域进行填充,完成对所述纯单色图片的显不; When [0116] the display unit 530, configured to, when the determining unit determines the image is a monochrome image of pure, filled rectangle drawing module call interface filling of the target region in accordance with said pure monochromatic color value, the complete said substantially pure monochromatic image is not;

[0117] 释放单元M0,用于当系统资源小于第一阈值时,释放所述纯单色图片解码后的图像数据所占用的系统内存,或者,当系统资源小于第二阈值时,释放所述纯单色图片占用的系统内存; [0117] releasing unit M0, when the system resources for less than a first threshold, to release the pure monochrome image data decoded image memory occupied by the system, or when system resources are less than the second threshold value, the release pure monochrome images take up system memory;

[0118] 保存单元550,用于在所述释放单元释放系统内存后,保存为所述纯单色图片设置的纯单色标识及所述纯单色图片的纯单色颜色值。 [0118] storage unit 550, a system memory after the release unit releases stored identification provided for purely monochromatic monochrome image and the pure color value of the pure pure monochromatic monochrome image.

[0119] 具体的,判断单元520可以包括(图5中未示出): [0119] Specifically, the determination unit 520 may include (not shown in FIG. 5):

[0120] 颜色值统计子单元,用于统计解码后的图像数据中的每个像素点的颜色值; [0120] Statistics subunit color value, a color value for each pixel of the decoded image data in statistics;

[0121] 纯单色图片确定子单元,用于当所述每个像素点的颜色值一致时,确定所述图片为纯单色图片。 [0121] Pure monochrome image determination sub-unit for, when the color value of each pixel is consistent, the image is determined as a pure monochromatic image.

[0122] 具体的,显示单元530可以包括(图5中未示出): [0122] Specifically, the display unit 530 may include (not shown in FIG. 5):

[0123] 第一获取子单元,用于当按照所述图片的原始尺寸进行显示时,获取所述图片的宽度参数和高度参数; [0123] a first obtaining sub-unit, configured to, when displaying the picture with the original size, the picture acquired width and height parameters parameters;

[0124] 第一计算子单元,用于根据所述宽度参数和高度参数计算用于表示所述目标区域的参数值; [0124] a first calculating sub-unit, for calculating a parameter based on the width and height parameters for the parameter value representing the target area;

[0125] 第一调用填充子单元,用于将所述目标区域的参数值和所述纯单色颜色值作为所述绘图模块矩形填充接口的输入参数值,调用所述绘图模块矩形填充接口将所述纯单色颜色值填充到所述目标区域。 [0125] The first call padding sub-unit, parameter values ​​for the target area and said monochrome pure color value as the input parameter value drawing rectangle filling module interface, invoking the filled rectangle drawing module interface the pure monochromatic color values ​​to fill the target area.

[0126] 具体的,显示单元530也可以包括(图5中未示出): [0126] Specifically, the display unit 530 may also include (not shown in FIG. 5):

[0127] 第二获取子单元,用于当对所述图片进行放大后显示时,获取所述图片的宽度参数和高度参数,以及所述图片显示到所述目标区域的放大倍数; [0127] The second obtaining sub-unit, configured to, when displaying the image of said amplifying to obtain the parameters width and height of the image parameters, and to display the image magnification of the target area;

[0128] 第二计算子单元,用于根据所述放大倍数以及所述图片的宽度参数和高度参数计算用于表示所述目标区域的参数值; [0128] The second calculating sub-unit, according to the width and height parameters and parameters of the magnification of the image for calculating said parameter value representing the target area;

[0129] 第二调用填充子单元,用于将所述目标区域的参数值和所述纯单色颜色值作为所述绘图模块矩形填充接口的输入参数值,调用所述绘图模块矩形填充接口将所述纯单色颜色值填充到所述目标区域。 [0129] The second sub-unit is filled call, the parameter value for the target region and the pure color value as the monochrome input parameter value drawing rectangle filling module interface, invoking the filled rectangle drawing module interface the pure monochromatic color values ​​to fill the target area.

[0130] 通过对以上实施方式的描述可知,本申请实施例中对待显示到目标区域的图片进行解码,根据解码后的图像数据判断图片是否为纯单色图片,当图片为纯单色图片时,调用绘图模块矩形填充接口按照纯单色颜色值对目标区域进行填充。 [0130] the description of the above embodiment can be seen, application of the present embodiment shown in the embodiment to treat the target area image is decoded according to the image data of the decoded picture judged whether pure monochrome image, when the image is a monochrome image when pure , filled rectangle drawing module calls the target interface area according to the filling of the pure monochromatic color value. 应用本申请实施例显示纯单色图片时,无需按照解码后的像素点逐一进行显示,而是通过调用绘图模块矩形填充接口对目标区域进行整体填充,因此节约了显示纯单色图片的时间;当系统内存不足时,只需要记录图片的纯单色标识和纯单色颜色值,当再次显示该图片时,则只需要再次调用绘图模块矩形填充接口按照所保存的纯单色颜色值进行填充即可,无需重新加载图片或者重新对图片进行解码,能够使内存空间得到充分的释放。 This application example shows application of pure monochrome image, one by one without follow decoded pixel display, but the interface of the target area is filled by filling the entire rectangle drawing module calls, thus saving the time display pure monochrome image; when the system memory is low, only pure monochromatic image to be recorded and identified pure monochrome color values, when the display image again, filled rectangle drawing module need only call the interface again and fills the pure color value stored monochrome without the need to reload or re-picture decode the picture, the memory space can be fully released.

[0131] 本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。 [0131] Those skilled in the art may clearly understand that may be implemented by software plus a necessary universal hardware platform technology in the embodiment of the present invention. 基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。 Based on this understanding, technical solutions of the embodiments in the present invention or the part contributing to the prior art may be embodied in a software product out of the computer software product may be stored in a storage medium such as ROM / RAM , a magnetic disk, an optical disk, and include several instructions that enable a computer device (may be a personal computer, a server, or network device) to perform various method embodiments or some parts of the embodiment of the present invention.

[0132] 本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。 [0132] In the present specification, various embodiments are described in a progressive manner, between similar portions of the same embodiment of various embodiments refer to each other, it is different from the embodiment and the other embodiments described each embodiment focus. 尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。 In particular, for embodiments of the system, since they are substantially similar to the method embodiments, the description is relatively simple, some embodiments of the methods see relevant point can be described.

[0133] 以上所述的本发明实施方式,并不构成对本发明保护范围的限定。 [0133] The above-described embodiments of the present invention, not to limit the scope of the present invention. 任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明的保护范围之内。 Any modifications within the spirit and principle of the present invention, equivalent substitutions and improvements should be included within the scope of the present invention.

Claims (10)

1. 一种纯单色图片的显示方法,其特征在于,包括: 对待显示到目标区域的图片进行解码;根据解码后的图像数据判断所述图片是否为纯单色图片;当所述图片为纯单色图片时,调用绘图模块矩形填充接口按照所述纯单色颜色值对所述目标区域进行填充,完成对所述纯单色图片的显示。 A pure monochromatic image display method, comprising: treating a target area of ​​the displayed picture decoding; in accordance with the decoded image data judging whether the picture is a pure monochromatic image; when the picture is pure monochrome image, filled rectangle drawing module call interface filling of the target region in accordance with said pure monochromatic color values, the display is completed pure monochromatic picture.
2.根据权利要求1所述的方法,其特征在于,所述根据解码后的图像数据判断所述图片是否为纯单色图片包括:统计解码后的图像数据中的每个像素点的颜色值;当所述每个像素点的颜色值一致时,确定所述图片为纯单色图片。 The method according to claim 1, wherein said image data according to the determination whether the decoded picture is a pure monochromatic image comprising: color value of each pixel of the decoded image data in statistical ; when the color of each pixel point values ​​match, determining that the picture is a pure monochromatic image.
3.根据权利要求1所述的方法,其特征在于,所述调用绘图模块矩形填充接口按照所述纯单色颜色值对所述目标区域进行填充包括:当按照所述图片的原始尺寸进行显示时,获取所述图片的宽度参数和高度参数; 根据所述宽度参数和高度参数计算用于表示所述目标区域的参数值; 将所述目标区域的参数值和所述纯单色颜色值作为所述绘图模块矩形填充接口的输入参数值,调用所述绘图模块矩形填充接口将所述纯单色颜色值填充到所述目标区域。 3. The method according to claim 1, wherein said rectangle fill drawing call interface module comprises padding the target region according to the pure monochromatic color values: When displaying the picture with the original size when acquiring the image width and height parameters parameters; parameters in accordance with the width and height parameters for calculating a parameter value representing the target region; the region of the target parameter value and said pure color value as monochrome the drawing module input parameter value rectangle filling interface, invoking the filled rectangle drawing module interfaces the pure color value is filled into the monochrome target area.
4.根据权利要求1所述的方法,其特征在于,所述调用绘图模块矩形填充接口按照所述纯单色颜色值对所述目标区域进行填充包括:当对所述图片进行放大后显示时,获取所述图片的宽度参数和高度参数,以及所述图片显示到所述目标区域的放大倍数;根据所述放大倍数以及所述图片的宽度参数和高度参数计算用于表示所述目标区域的参数值;将所述目标区域的参数值和所述纯单色颜色值作为所述绘图模块矩形填充接口的输入参数值,调用所述绘图模块矩形填充接口将所述纯单色颜色值填充到所述目标区域。 4. The method according to claim 1, wherein said call interface drawing module rectangle filling comprises filling the target region according to the pure monochromatic color value: when the enlarged image is displayed obtaining parameters of the picture width and height parameters, and to display the image magnification of the target area; and a calculation according to the magnification of the image width and height parameters for the parameters representing the target region parameter value; parameter value of the target area and said monochrome pure color value as an input parameter value of the filled rectangle drawing module interface, invoking the filled rectangle drawing module interfaces the pure color value is filled into monochrome the target area.
5.根据权利要求1所述的方法,其特征在于,还包括:当系统资源小于第一阈值时,释放所述纯单色图片解码后的图像数据所占用的系统内存,或者,当系统资源小于第二阈值时,释放所述纯单色图片占用的系统内存;在释放系统内存后,保存为所述纯单色图片设置的纯单色标识及所述纯单色图片的纯单色颜色值。 5. The method according to claim 1, characterized in that, further comprising: when the system resources than the first threshold value, to release the pure monochrome image data decoded image memory occupied by the system, or when system resources is less than the second threshold value, the system releases the memory occupied by the pure monochromatic image; after releasing the system memory, and the stored identification pure monochromatic pure monochromatic image provided for the pure monochromatic color monochromatic pictures pure value.
6. 一种纯单色图片的显示装置,其特征在于,包括: 解码单元,用于对待显示到目标区域的图片进行解码;判断单元,用于根据解码后的图像数据判断所述图片是否为纯单色图片; 显示单元,用于当所述判断单元判断所述图片为纯单色图片时,调用绘图模块矩形填充接口按照所述纯单色颜色值对所述目标区域进行填充,完成对所述纯单色图片的显示。 A pure monochromatic image display apparatus comprising: a decoding unit for displaying pictures treat decoding target area; determining means for determining whether the image data whether the decoded picture pure monochrome image; display unit when said determination means determines that the image is a monochrome image of pure, filled rectangle drawing module call interface of the target area is filled according to the value of pure monochromatic color, complete the pure monochrome picture display.
7.根据权利要求6所述的装置,其特征在于,所述判断单元包括: 颜色值统计子单元,用于统计解码后的图像数据中的每个像素点的颜色值;纯单色图片确定子单元,用于当所述每个像素点的颜色值一致时,确定所述图片为纯单色图片。 7. The device according to claim 6, wherein said determining unit comprises: a statistical value of a color sub-unit, a color value of each pixel of the decoded image data in statistics; pure monochromatic image is determined sub-unit, configured to, when the color value of each pixel coincident, the picture is determined as a pure monochromatic image.
8.根据权利要求6所述的装置,其特征在于,所述显示单元包括:第一获取子单元,用于当按照所述图片的原始尺寸进行显示时,获取所述图片的宽度参数和高度参数;第一计算子单元,用于根据所述宽度参数和高度参数计算用于表示所述目标区域的参数值;第一调用填充子单元,用于将所述目标区域的参数值和所述纯单色颜色值作为所述绘图模块矩形填充接口的输入参数值,调用所述绘图模块矩形填充接口将所述纯单色颜色值填充到所述目标区域。 8. The apparatus according to claim 6, wherein the display unit comprises: a first obtaining subunit, configured to, when displaying the picture with the original size, the picture acquired width and height parameters parameter; calculating a first sub-unit, for calculating a parameter based on the width and height parameters for the parameter value representing the target region; a first call padding sub-unit, and the parameter values ​​for the target area pure monochrome color value as an input parameter value of the filled rectangle drawing module interface, invoking the filled rectangle drawing module interfaces the pure color value is filled into the monochrome target area.
9.根据权利要求6所述的装置,其特征在于,所述显示单元包括:第二获取子单元,用于当对所述图片进行放大后显示时,获取所述图片的宽度参数和高度参数,以及所述图片显示到所述目标区域的放大倍数;第二计算子单元,用于根据所述放大倍数以及所述图片的宽度参数和高度参数计算用于表示所述目标区域的参数值;第二调用填充子单元,用于将所述目标区域的参数值和所述纯单色颜色值作为所述绘图模块矩形填充接口的输入参数值,调用所述绘图模块矩形填充接口将所述纯单色颜色值填充到所述目标区域。 9. The apparatus according to claim 6, wherein the display unit comprises: a second obtaining subunit, configured to, when displaying the image of said amplifying to obtain the image width and height parameters Parameter , and the picture to the display magnification of the target region; a second calculating subunit, height and width parameter according to the parameter of the picture magnification and calculating said parameter value representing a target area; filling the second sub-unit calls for the value of the parameter of the target area and said monochrome pure color value as an input parameter value of the filled rectangle drawing module interface, invoking the filled rectangle drawing module interfaces the pure monochrome color values ​​to fill the target area.
10.根据权利要求6所述的装置,其特征在于,还包括:释放单元,用于当系统资源小于第一阈值时,释放所述纯单色图片解码后的图像数据所占用的系统内存,或者,当系统资源小于第二阈值时,释放所述纯单色图片占用的系统内存;保存单元,用于在所述释放单元释放系统内存后,保存为所述纯单色图片设置的纯单色标识及所述纯单色图片的纯单色颜色值。 10. The apparatus according to claim 6, characterized in that, further comprising: a releasing unit, configured to, when the system resources than the first threshold value, the image data after the release of pure monochromatic picture decoding occupied by system memory, Alternatively, when the system resources are less than the second threshold value, the system releases the memory occupied by the pure monochromatic image; storage unit, configured to, after the release unit releases the system memory, to save the monochromatic image provided pure pure single pure monochrome and color value identifying the color of pure monochromatic image.
CN 201110165847 2011-06-20 2011-06-20 Method and device for displaying pure monochrome picture CN102394053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110165847 CN102394053B (en) 2011-06-20 2011-06-20 Method and device for displaying pure monochrome picture

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 201110165847 CN102394053B (en) 2011-06-20 2011-06-20 Method and device for displaying pure monochrome picture
HK12109045A HK1168935A1 (en) 2011-06-20 2012-09-14 A method and device for displaying a monochrome image

Publications (2)

Publication Number Publication Date
CN102394053A true CN102394053A (en) 2012-03-28
CN102394053B CN102394053B (en) 2013-08-14

Family

ID=45861354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110165847 CN102394053B (en) 2011-06-20 2011-06-20 Method and device for displaying pure monochrome picture

Country Status (2)

Country Link
CN (1) CN102394053B (en)
HK (1) HK1168935A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504107A (en) * 2014-12-30 2015-04-08 百度在线网络技术(北京)有限公司 Search picture display method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1649384A (en) * 2004-01-19 2005-08-03 株式会社理光 Image processing apparatus, image processing program and storage medium
US20060176403A1 (en) * 2005-01-05 2006-08-10 Hillcrest Laboratories, Inc. Distributed software construction for user interfaces
CN101052131A (en) * 2006-04-06 2007-10-10 株式会社尼康 Imaging apparatus
JP2010081540A (en) * 2008-09-29 2010-04-08 Sharp Corp Moving image reproducing apparatus and moving image reproducing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1649384A (en) * 2004-01-19 2005-08-03 株式会社理光 Image processing apparatus, image processing program and storage medium
US20060176403A1 (en) * 2005-01-05 2006-08-10 Hillcrest Laboratories, Inc. Distributed software construction for user interfaces
CN101052131A (en) * 2006-04-06 2007-10-10 株式会社尼康 Imaging apparatus
JP2010081540A (en) * 2008-09-29 2010-04-08 Sharp Corp Moving image reproducing apparatus and moving image reproducing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504107A (en) * 2014-12-30 2015-04-08 百度在线网络技术(北京)有限公司 Search picture display method and device

Also Published As

Publication number Publication date
CN102394053B (en) 2013-08-14
HK1168935A1 (en) 2014-03-28

Similar Documents

Publication Publication Date Title
KR101650999B1 (en) Rendering mode selection in graphics processing units
US20110292060A1 (en) Frame buffer sizing to optimize the performance of on screen graphics in a digital electronic device
JP2007206644A (en) Image display system, image display method, image display program, recording medium, data processor, and image display device
JP5654134B2 (en) Parallel image processing with multiple processors
CN101635813B (en) Image processing device, image display device, and image data producing method
JP2009165106A (en) Image distortion correction
JP5182957B2 (en) Variable scaling of the image data for aspect ratio conversion
CN101593349B (en) Method for converting two-dimensional image into three-dimensional image
CN1286063C (en) Technology for removing false image of liquid crystal projector
CN101388157B (en) An electronic map display method, apparatus, and equipment
CN103049914A (en) High-resolution depth graph generation system and method based on boundary
JP6186512B2 (en) Image tone adjustment using the local gradation curve calculation
KR20130079508A (en) Pixel rendering on display
CN103729110B (en) Pop information display method, and a terminal device
CN103336816A (en) Canvas element rendering method and device realized on Android system based on GPU (Graphic Processing Unit)
KR101639852B1 (en) Pixel value compaction for graphics processing
CN101499172A (en) ActiveX drafting method and device
US9430810B2 (en) Drawing method, apparatus, and terminal
JP6157138B2 (en) Image processing apparatus
CN102543045A (en) Method of picture display and device thereof
US6847375B2 (en) Rendering process
US9240033B2 (en) Image super-resolution reconstruction system and method
US20110145730A1 (en) Utilization of Browser Space
US8913068B1 (en) Displaying video on a browser
CN101414258A (en) Method and apparatus for changing color of skin picture

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1168935

Country of ref document: HK

C14 Grant of patent or utility model
REG Reference to a national code

Ref country code: HK

Ref legal event code: GR

Ref document number: 1168935

Country of ref document: HK