CN105551069B - A kind of real-time generation method and system of thumbnail - Google Patents

A kind of real-time generation method and system of thumbnail Download PDF

Info

Publication number
CN105551069B
CN105551069B CN201510893767.6A CN201510893767A CN105551069B CN 105551069 B CN105551069 B CN 105551069B CN 201510893767 A CN201510893767 A CN 201510893767A CN 105551069 B CN105551069 B CN 105551069B
Authority
CN
China
Prior art keywords
attaching area
colour attaching
color
color value
palette
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201510893767.6A
Other languages
Chinese (zh)
Other versions
CN105551069A (en
Inventor
魏晓文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Cotton Research of Chinese Academy of Agricultural Sciences
Original Assignee
Institute of Cotton Research of Chinese Academy of Agricultural Sciences
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 Institute of Cotton Research of Chinese Academy of Agricultural Sciences filed Critical Institute of Cotton Research of Chinese Academy of Agricultural Sciences
Priority to CN201510893767.6A priority Critical patent/CN105551069B/en
Publication of CN105551069A publication Critical patent/CN105551069A/en
Application granted granted Critical
Publication of CN105551069B publication Critical patent/CN105551069B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Abstract

The invention discloses the real-time generation methods and system of a kind of thumbnail, are related to pictograph field.This method:The number of colour attaching area and position of the existing color value in colour attaching area in palette are associated setting by the colour attaching area for obtaining target thumbnail;Obtain the request of colour attaching area variation color;Obtain the position B in palette with the associated color value of number of colour attaching area A in request;The RGB color sequence of colour attaching area A is adjusted according to the picture/mb-type of target index picture and occupies byte number and calculates the color value D of colour attaching area A, is written in the position B of palette, is completed the color transformed of target index picture.The system:Picture analyzing module, palette, relating module, request reception and searching module and calculating writing module.Conversion process efficient quick of the present invention does not cause any change and damage, use scope wide image shape and picture quality.

Description

A kind of real-time generation method and system of thumbnail
Technical field
The present invention relates to pictograph field more particularly to the real-time generation methods and system of a kind of thumbnail.
Background technology
In the application of GIS-Geographic Information System class, it is often necessary to conversion process is carried out to image color, especially in layout Real-time generating process in, efficiently quickly it is color transformed processing it is particularly important.For raster format etc. in computer program The processing of image file, it is mostly consistent with the man-machine dialogue system method in image processing software, to large area color lump color into The color to certain pixel adjacent position pixel in image is needed to be compared when row transformation, to decide whether to be become accordingly It changes.And the efficiency of this comparative analysis process is very low, due to decompress reduction especially in compressed image file, locates It is just lower to manage efficiency.For this purpose, also there is the solution taken and make more parts of different colors in advance to call at any time, but deposit The problems such as being difficult to reflect real time data variation and low drawing efficiency.
Invention content
It is existing to solve the purpose of the present invention is to provide the real-time generation method and system of a kind of thumbnail Foregoing problems present in technology.
To achieve the goals above, the real-time generation method of thumbnail of the present invention, this method include:
S1 obtains the colour attaching area of target thumbnail, the number of colour attaching area and the existing color value in colour attaching area is being mixed colours Position in plate is associated setting;
S2 obtains the request of colour attaching area variation color;
S3 obtains the position B in palette with the associated color value of number of colour attaching area A in request;
S4 adjusts the RGB color sequence of colour attaching area A according to the picture/mb-type of target index picture and occupies byte number and count Calculate the color value D of colour attaching area A;
Color value D is written in the position B of palette by S5, completes the color transformed of target index picture.
Preferably, step S1, the number of the colour attaching area is corresponded with position of the color value in palette to be set It sets.
Preferably, a colour attaching area is endowed unique color value, and a kind of color value can be endowed more than one colour attaching area.
Preferably, further comprising the steps of before step S1:
N color value is arranged in palette block, obtains and stores each for S01, the type according to target index picture The essential information of color value and its position in palette, the n are more than or equal to 1.
Preferably, the colour attaching area for obtaining target thumbnail is realized by the following method:Utilize image editing software Target index picture is edited, m colour attaching area of the Target Photo is obtained, the m is more than or equal to 1.
Preferably, the picture/mb-type includes the non-index image file for indexing class image file and producing index class.
It is highly preferred that the picture/mb-type includes png, bmp, jpg, tiff, gif, pcx, tga, exif, fpx, svg, Psd, cdr, pcd, dxf, ufo, eps, ai, raw.
Preferably, in step s 2, further comprising the steps of:
S21 judges the quantity that the colour attaching area of color change is required in the request of colour attaching area variation color, if quantity is 1, Then it is directly entered S3;If quantity is more than or equal to 2, the colour attaching area of color change will be needed to be ranked up, subsequently into S21;
S21, judge need color change colour attaching area require variation color value it is whether identical, if it is not the same, then according to Sequence enters S3;If identical, enter S22;
S22 will be associated, so with position of the associated color value in color value same colored area of variation in palette After obtaining the wherein number of any one colour attaching area afterwards, into S3.
The invention discloses a kind of system of real-time generation method that realizing the thumbnail, which includes:
Picture analyzing module:Using image editing software editor's target index picture, the m of the target index picture is obtained A colour attaching area, and colour attaching area is numbered, the m is more than or equal to 1;
Palette:It is responsible for adjusting the quantity of color value according to picture/mb-type and assigns each color value position;
Relating module:The number of colour attaching area is associated with position of the existing color value in colour attaching area in palette and is set It sets;
Request receives and searching module:The request of colour attaching area variation color is received, and request is analyzed, is searched simultaneously With position of the associated color value in associated colour attaching area in palette in request;
Calculate writing module:The RGB color sequence of colour attaching area A is adjusted according to the picture/mb-type of target index picture and is occupied Byte number and the color value D for calculating colour attaching area A, color value D is written in the position B of palette, completes target index picture It is color transformed.
Preferably, the request receives and searching module includes:
Judgment module one:Judge colour attaching area variation color request in require color change colour attaching area quantity, if Quantity is 1, obtains the number of colour attaching area in request, then sends result to searching module;It, will if quantity is more than or equal to 2 It needs the colour attaching area of color change to be ranked up, then sends result to judgment module two;
Judgment module two:Judge to need the colour attaching area of color change to require the color value of variation whether identical, if not phase Together, the number for obtaining colour attaching area in request, then send result to searching module;If identical, restriction is sent result to Module;
Limit module:It will be closed with position of the associated color value in color value same colored area of variation in palette Then connection obtains the number of all colour attaching areas in request, finally sends result to searching module;
Searching module:Judgment module one, judgment module two and the number for limiting the colour attaching area that module is sent are obtained, is then looked into It looks for and position of the associated associated color value in colour attaching area in palette in request.
The beneficial effects of the invention are as follows:
1, conversion process efficient quick, each colour attaching area only need the color value of 3 bytes of write-in;
2, any change and damage are not caused to image shape and picture quality;
3, it is suitable for the color transformed processing of all colours index class image file (BMP, GIF, PNG etc.);
4, especially suitable in GIS application, real-time distribution figure etc. automatically generates.
Description of the drawings
Fig. 1 is the real-time generation method flow diagram of the thumbnail;
Fig. 2 is the real-time generation system structure diagram of the thumbnail;
Fig. 3 is the structural schematic diagram that request receives with searching module described in Fig. 2.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, below in conjunction with attached drawing, to the present invention into Row is further described.It should be appreciated that the specific embodiments described herein are only used to explain the present invention, it is not used to Limit the present invention.
Embodiment
Referring to Fig.1, the real-time generation method of thumbnail described in the present embodiment, this method include:
S1 obtains the colour attaching area of target thumbnail, the number of colour attaching area and the existing color value in colour attaching area is being mixed colours Position in plate is associated setting;
S2 obtains the request of colour attaching area variation color;
S3 obtains the position B in palette with the associated color value of number of colour attaching area A in request;
S4 adjusts the RGB color sequence of colour attaching area A according to the picture/mb-type of target index picture and occupies byte number and count Calculate the color value D of colour attaching area A;
Color value D is written in the position B of palette by S5, completes the color transformed of target index picture.In more detail It illustrates:
(1) number of step S1, the colour attaching area are arranged in a one-to-one correspondence with position of the color value in palette.
One colour attaching area is endowed unique color value, and a kind of color value can be endowed more than one colour attaching area.
(2) further comprising the steps of before step S1:
N color value is arranged in palette block, obtains and stores each for S01, the type according to target index picture The essential information of color value and its position in palette, the n are more than or equal to 1.
(3) colour attaching area for obtaining target thumbnail is realized by the following method:Utilize image editing software editor Target index picture, obtains m colour attaching area of the Target Photo, and the m is more than or equal to 1.
(4) picture/mb-type includes the non-index image file for indexing class image file and producing index class.More The picture/mb-type of body includes:Png, bmp, jpg, tiff, gif, pcx, tga, exif, fpx, svg, psd, cdr, pcd, Dxf, ufo, eps, ai, raw.
(5) in step s 2, further comprising the steps of:
S21 judges the quantity that the colour attaching area of color change is required in the request of colour attaching area variation color, if quantity is 1, Then it is directly entered S3;If quantity is more than or equal to 2, the colour attaching area of color change will be needed to be ranked up, subsequently into S21;
S21, judge need color change colour attaching area require variation color value it is whether identical, if it is not the same, then according to Sequence enters S3;If identical, enter S22;
S22 will be associated, so with position of the associated color value in color value same colored area of variation in palette After obtaining the wherein number of any one colour attaching area afterwards, into S3.
A kind of system of real-time generation method that realizing thumbnail as described embodiments, the system include:
Picture analyzing module:Using image editing software editor's target index picture, the m of the target index picture is obtained A colour attaching area, and colour attaching area is numbered, the m is more than or equal to 1;
Palette:It is responsible for adjusting the quantity of color value according to picture/mb-type and assigns each color value position;
Relating module:The number of colour attaching area is associated with position of the existing color value in colour attaching area in palette and is set It sets;
Request receives and searching module:The request of colour attaching area variation color is received, and request is analyzed, is searched simultaneously With position of the associated color value in associated colour attaching area in palette in request;
Calculate writing module:The RGB color sequence of colour attaching area A is adjusted according to the picture/mb-type of target index picture and is occupied Byte number and the color value D for calculating colour attaching area A, color value D is written in the position B of palette, completes target index picture It is color transformed.
Wherein, the request receives and searching module includes:
Judgment module one:Judge colour attaching area variation color request in require color change colour attaching area quantity, if Quantity is 1, obtains the number of colour attaching area in request, then sends result to searching module;It, will if quantity is more than or equal to 2 It needs the colour attaching area of color change to be ranked up, then sends result to judgment module two;
Judgment module two:Judge to need the colour attaching area of color change to require the color value of variation whether identical, if not phase Together, the number for obtaining colour attaching area in request, then send result to searching module;If identical, restriction is sent result to Module;
Limit module:It will be closed with position of the associated color value in color value same colored area of variation in palette Then connection obtains the number of all colour attaching areas in request, finally sends result to searching module;
Searching module:Judgment module one, judgment module two and the number for limiting the colour attaching area that module is sent are obtained, is then looked into It looks for and position of the associated associated color value in colour attaching area in palette in request.
By using above-mentioned technical proposal disclosed by the invention, following beneficial effect has been obtained:Conversion process is efficiently fast Victory, each colour attaching area only need the color value of 3 bytes of write-in;Any change and damage are not caused to image shape and picture quality; Color transformed processing suitable for all colours index class image file (BMP, GIF, PNG etc.);Especially suitable for geography information In system application, real-time distribution figure etc. automatically generates.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered Depending on protection scope of the present invention.

Claims (10)

1. a kind of real-time generation method of thumbnail, which is characterized in that this method includes:
S1 obtains the colour attaching area of target thumbnail, by the number of colour attaching area and the existing color value in colour attaching area in palette Position be associated setting;
S2 obtains the request of colour attaching area variation color;
S3 obtains the position B in palette with the associated color value of number of colour attaching area A in request;
S4 adjusts the RGB color sequence of colour attaching area A according to the picture/mb-type of target index picture and occupies byte number and calculate The color value D of color area A;
Color value D is written in the position B of palette by S5, completes the color transformed of target index picture.
2. method according to claim 1, which is characterized in that step S1, the number of the colour attaching area exist with the color value Position in palette is arranged in a one-to-one correspondence.
3. method according to claim 1, which is characterized in that a colour attaching area is endowed unique color value, a kind of color value More than one colour attaching area can be endowed.
4. method according to claim 1, which is characterized in that further comprising the steps of before step S1:
N color value is arranged in palette block, obtains and stores each color for S01, the type according to target index picture The essential information of value and its position in palette, the n are more than or equal to 1.
5. method according to claim 1, which is characterized in that the colour attaching area for obtaining target thumbnail is according to following sides Method is realized:Using image editing software editor's target index picture, m colour attaching area of the Target Photo is obtained, the m is more than Equal to 1.
6. method according to claim 1, which is characterized in that the picture/mb-type includes index class image file and produces Index the non-index image file of class.
7. method according to claim 6, which is characterized in that the picture/mb-type includes png, bmp, jpg, tiff, gif, Pcx, tga, exif, fpx, svg, psd, cdr, pcd, dxf, ufo, eps, ai, raw.
8. method according to claim 1, which is characterized in that in step s 2, further comprising the steps of:
S21 judges the quantity that the colour attaching area of color change is required in the request of colour attaching area variation color, if quantity is 1, directly It taps into S3;If quantity is more than or equal to 2, the colour attaching area of color change will be needed to be ranked up, subsequently into S21;
S21, judge need color change colour attaching area require variation color value it is whether identical, if it is not the same, then sequentially into Enter S3;If identical, enter S22;
S22 will be associated with position of the associated color value in color value same colored area of variation in palette, then obtain After taking the wherein number of any one colour attaching area, into S3.
9. a kind of system for realizing the real-time generation method of thumbnail as described in claim 1-7 any one, special Sign is that the system includes:
Picture analyzing module:Using image editing software editor's target index picture, m of the target index picture are obtained Color area, and colour attaching area is numbered, the m is more than or equal to 1;
Palette:It is responsible for adjusting the quantity of color value according to picture/mb-type and assigns each color value position;
Relating module:The number of colour attaching area and position of the existing color value in colour attaching area in palette are associated setting;
Request receives and searching module:The request of colour attaching area variation color is received, and request is analyzed, while searching and asking Ask position of the associated color value in associated colour attaching area in palette;
Calculate writing module:The RGB color sequence of colour attaching area A is adjusted according to the picture/mb-type of target index picture and occupies byte The color value D for counting and calculating colour attaching area A, color value D is written in the position B of palette, completes the color of target index picture Color conversion.
10. system according to claim 9, which is characterized in that the request receives and searching module includes:
Judgment module one:Judge colour attaching area variation color request in require color change colour attaching area quantity, if quantity It is 1, obtains the number of colour attaching area in request, then send result to searching module;If quantity is more than or equal to 2, will need The colour attaching area of color change is ranked up, and then sends result to judgment module two;
Judgment module two:Judge to need the colour attaching area of color change to require the color value of variation whether identical, if it is not the same, obtaining The number for taking colour attaching area in request, then send result to searching module;If identical, restriction module is sent result to;
Limit module:It will be associated with position of the associated color value in color value same colored area of variation in palette, Then the number for obtaining all colour attaching areas in request, finally sends result to searching module;
Searching module:Obtain judgment module one, judgment module two and limit module send colour attaching area number, then search with Position of the associated associated color value in colour attaching area in palette in request.
CN201510893767.6A 2015-11-30 2015-11-30 A kind of real-time generation method and system of thumbnail Expired - Fee Related CN105551069B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510893767.6A CN105551069B (en) 2015-11-30 2015-11-30 A kind of real-time generation method and system of thumbnail

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510893767.6A CN105551069B (en) 2015-11-30 2015-11-30 A kind of real-time generation method and system of thumbnail

Publications (2)

Publication Number Publication Date
CN105551069A CN105551069A (en) 2016-05-04
CN105551069B true CN105551069B (en) 2018-08-14

Family

ID=55830245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510893767.6A Expired - Fee Related CN105551069B (en) 2015-11-30 2015-11-30 A kind of real-time generation method and system of thumbnail

Country Status (1)

Country Link
CN (1) CN105551069B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108776982A (en) * 2018-05-31 2018-11-09 苏州蜗牛数字科技股份有限公司 A kind of display methods based on palette compressed picture
CN108986180B (en) * 2018-06-07 2022-09-16 创新先进技术有限公司 Palette generation method and device and electronic equipment
CN115457167B (en) * 2022-09-21 2023-06-09 山东大学 Palette design system based on color sorting

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1177172A (en) * 1996-06-29 1998-03-25 三星电子株式会社 Sub-picture restoring method and apparatus in digital versatile disk system
US6819793B1 (en) * 2000-06-30 2004-11-16 Intel Corporation Color distribution for texture and image compression
CN1568483A (en) * 2001-10-11 2005-01-19 国际商业机器公司 Color bitmap normalization
CN102289497A (en) * 2011-08-22 2011-12-21 上海梅花信息有限公司 Document preview image generating system and method
CN102523367A (en) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 Real-time image compression and reduction method based on plurality of palettes
CN102881026A (en) * 2012-08-15 2013-01-16 大连理工大学 Palette device and generation method for image with transparency information
CN103209326A (en) * 2013-03-29 2013-07-17 惠州学院 PNG (Portable Network Graphic) image compression method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI317914B (en) * 2006-08-03 2009-12-01 Via Tech Inc Color-displayed method, color-changed method and apparatus thereof
JP4978348B2 (en) * 2006-09-08 2012-07-18 コニカミノルタビジネステクノロジーズ株式会社 Image processing system and image processing method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1177172A (en) * 1996-06-29 1998-03-25 三星电子株式会社 Sub-picture restoring method and apparatus in digital versatile disk system
US6819793B1 (en) * 2000-06-30 2004-11-16 Intel Corporation Color distribution for texture and image compression
CN1568483A (en) * 2001-10-11 2005-01-19 国际商业机器公司 Color bitmap normalization
CN102289497A (en) * 2011-08-22 2011-12-21 上海梅花信息有限公司 Document preview image generating system and method
CN102523367A (en) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 Real-time image compression and reduction method based on plurality of palettes
CN102881026A (en) * 2012-08-15 2013-01-16 大连理工大学 Palette device and generation method for image with transparency information
CN103209326A (en) * 2013-03-29 2013-07-17 惠州学院 PNG (Portable Network Graphic) image compression method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
《C++Builder环境下调色板的使用》;童韬等;《现代计算机(专业版)》;20010430(第4期);全文 *
《一种使用调色板的图像颜色量化设计》;支建伟;《中国有线电视》;20040229(第2期);全文 *
《用VC实现位图文件处理》;卢强等;《电子技术》;20110831(第8期);全文 *
《面向视觉的调色板技术》;周经伦等;《微型机与应用》;19950607(第6期);全文 *

Also Published As

Publication number Publication date
CN105551069A (en) 2016-05-04

Similar Documents

Publication Publication Date Title
CN107610238B (en) AR dynamic model system of power equipment and working method thereof
CN105551069B (en) A kind of real-time generation method and system of thumbnail
CN109218619A (en) Image acquiring method, device and system
CN103810685A (en) Super resolution processing method for depth image
CN108197802A (en) It is a kind of based on BIM technology to the method and system of concrete structure construction quality management and control
CN104636726A (en) Method and device for identifying image colors and terminal
CN106845935A (en) A kind of method and system of engineering project flow template
CN105955733A (en) Icon modifying method, icon modifying device and mobile terminal
EP3843418A1 (en) Video abstract generating method and apparatus, computing device, and storage medium
CN110134355A (en) Multi-screen sharing method, intelligence throw screen box and multi-screen shared system
CN103106700B (en) Automatic data center inspection method based on 3D technology
CN106530408A (en) Museum temporary exhibition planning and design system
CN104333732B (en) A kind of distributed video analysis method and system
CN105898331A (en) Bit allocation and rate control method for deep video coding
CN103986905A (en) Method for video space real-time roaming based on line characteristics in 3D environment
CN105872511A (en) Method for improving color temperature consistency of flat panel television through multiple gamma curves
CN106375658B (en) A kind of very high-precision image processing VLSI verification method
CN103516998A (en) Station caption superposition method for analog video
CN103473807A (en) 3D model transformation system and method
US20240046668A1 (en) Real-time license plate detection and recognition method and device based on color augmentation
CN107295255A (en) Determination method, device and the terminal of screening-mode
CN107392833A (en) A kind of adding method and adding set of the picture watermark based on smart machine
CN101686334A (en) Method and device for acquiring three-dimensional image scene
CN106021228A (en) Method and system for performing text analysis by utilizing knowledge topographic map
CN102724530A (en) Three-dimensional method for plane videos based on feedback control

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180814

Termination date: 20211130

CF01 Termination of patent right due to non-payment of annual fee