CN102456218B - A kind of method processed in the enterprising line position figure micro-pixels of flash - Google Patents

A kind of method processed in the enterprising line position figure micro-pixels of flash Download PDF

Info

Publication number
CN102456218B
CN102456218B CN201010523252.4A CN201010523252A CN102456218B CN 102456218 B CN102456218 B CN 102456218B CN 201010523252 A CN201010523252 A CN 201010523252A CN 102456218 B CN102456218 B CN 102456218B
Authority
CN
China
Prior art keywords
pix
flash
sub
error
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201010523252.4A
Other languages
Chinese (zh)
Other versions
CN102456218A (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.)
Shanghai Zhangmen Science and Technology Co Ltd
Original Assignee
Shengle Information Technolpogy Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shengle Information Technolpogy Shanghai Co Ltd filed Critical Shengle Information Technolpogy Shanghai Co Ltd
Priority to CN201010523252.4A priority Critical patent/CN102456218B/en
Publication of CN102456218A publication Critical patent/CN102456218A/en
Application granted granted Critical
Publication of CN102456218B publication Critical patent/CN102456218B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a kind of method processed in the enterprising line position figure micro-pixels of flash, comprise the steps: 1) as sub-pix Problem-Error occurs, it is judged that whether image is simple tile mode; Then use flashdraw in this way? the beginBitmapFill that API provides? API approach (arranges tile mode for repeating) and solves sub-pix Problem-Error; As otherwise entered step 2); 2) judge whether image can unify convergent-divergent at father's layer; Then unify convergent-divergent at father's layer in this way, to solve sub-pix Problem-Error; As otherwise entered step 3); 3) positions and dimensions of object is repaired, it is judged that whether the positions and dimensions of object is treatable less than in flash is the pixel value corresponding to unit based on orange red; It is then that the pixel value corresponding to unit is modified to the positions and dimensions of this object based on orange red in this way, to solve sub-pix Problem-Error. The method can efficiently solve sub-pix Problem-Error.

Description

A kind of method processed in the enterprising line position figure micro-pixels of flash
Technical field
The present invention relates to a kind of image processing method, particularly relate to a kind of method processed in the enterprising line position figure micro-pixels of flash.
Background technology
The unit of flash internal metric object's position and size is orange red (Twips), it is therefore an objective in order to allow application elements can keep consistent calculation when exporting distinct device. Following reduction formula generally can be used by inch or centimetre to be converted to orange red or pound (1 orange red is 1/20 pound):
1 pound=1/72 inch=20 orange reds
1 inch=72 pounds=1440 orange reds
1 centimetre=567 orange reds
But the API (ApplicationProgrammingInterface of operation display object in flash, application programming interfaces, it is also called application programming interface, be exactly the agreement of software system difference ingredient linking) parameter type major part be the data type of double-precision floating points, the width (width) of DisplayObjetct (DisplayObject class is to be placed on the base class of all objects shown in list) is such as set, height (height), x, the attributes such as y, at this moment program is likely to give expression to the numerical value higher than orange red precision and causes that this value is accepted or rejected by flash needs. like this significantly high in certain required precision or have under the environment of convergent-divergent to cause the sub-pixelbug (sub-pix mistake) in display. as it is shown in figure 1, the Scale (ratio) of 3 pictures is set to the Scale (ratio) of 3 pictures in 1, Fig. 1 b and is set to 1.0006 in Fig. 1 a, can be seen that there is one article of gap in the middle of the second of Fig. 1 b and the 3rd picture, and this gap must be disposed sometimes.
Solve the problems referred to above and have following difficult point:
Difficult point 1: problems is not easily discovered and reappears. Because problems needs specific convergent-divergent environment to produce, so being generally not easily noticeable and reappear. Often think that the bug in program goes inspection program repeatedly when present, bring difficulty so to the location of problem.
Difficult point 2: size and the position of repairing object are difficult to determine. It is relatively difficult for selecting a suitable precision that the position of object and size are repaired.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of method processed in the enterprising line position figure micro-pixels of flash, and the method can efficiently solve sub-pixelbug (sub-pix mistake) problem.
For solving above-mentioned technical problem, the present invention provides a kind of method processed in the enterprising line position figure micro-pixels of flash, comprises the steps:
(1) if there is sub-pix Problem-Error, it is judged that whether image is simple tile mode; If it is sub-pix Problem-Error is solved by flashdrawAPI (referring to the interface method of the drawing in flash authoring environment) the beginBitmapFillAPI method provided; If otherwise entering step (2);
(2) judge whether image can unify convergent-divergent at father's layer; If it is carry out unifying convergent-divergent at his father's layer, to solve sub-pix Problem-Error; If otherwise entering step (3);
(3) positions and dimensions of object is repaired, it is judged that the positions and dimensions of object is the treatable pixel value based on orange red (Twips) corresponding to unit less than in flash whether; It is then that the pixel value corresponding to unit is modified to the positions and dimensions of this object based on orange red in this way, to solve sub-pix Problem-Error.
In step (1), the beginBitmapFillAPI method that described flashdrawAPI provides solves sub-pix Problem-Error, particularly as follows: arranging tile mode by beginBitmapFillAPI method is repetition, namely arranging repeat parameter is that true is to solve sub-pix Problem-Error.
Step (3) specifically includes following steps:
A. treatable minimum pixel value in flash is calculated: 1 pound=1/72 inch=20 orange reds, it is assumed that screen DPI is equal to 72DPI, then in flash, treatable minimum pixel value is 0.05px, i.e. 1/20 orange red;
B. calculate the actual size of object and be modified: the size X of object being multiplied by its scaling Y and obtains result M, it has been found that the integral multiple of the non-zero .05px of its result M, at this moment need to this result M based on 0.05 precision round up to obtain result N;
C., the revised size of object and position are set: divided by the size X of object, the result N of step B is obtained scaling Y ', comes the revised size of calculating and setting object and position according to this scaling Y '.
The beneficial effects of the present invention is: the present invention can efficiently solve sub-pixelbug (sub-pix mistake) problem, and step is simple, workable.
Accompanying drawing explanation
Fig. 1 is the existing schematic diagram causing during operation display object in flash and occurring sub-pixelbug (sub-pix mistake) in display; Wherein, in Fig. 1 a, the Scale (ratio) of 3 pictures is set to 1; In Fig. 1 b, the Scale (ratio) of 3 pictures is set to 1.0006;
Fig. 2 is the schematic flow sheet of the inventive method.
Detailed description of the invention
As in figure 2 it is shown, a kind of method processed in the enterprising line position figure micro-pixels of flash of the present invention, comprise the steps:
1. if there is sub-pixelbug (sub-pix mistake) problem, it is judged that whether image is simple tile mode; If it is flashdrawAPI is used (to refer to the interface method of drawing in flash authoring environment, belonging to method well known in the art) beginBitmapFillAPI that provides (arranging tile mode for repeating, namely arranging repeat parameter is true) completes this work (namely solving sub-pixelbug problem);If otherwise entering step 2.
Such as: (example code // beginning represents comment line)
// known bitmap object (bitmapdata)
// create a simple shape called after shape:
Varshape:Shape=newShape ();
Quoting and called after graphic of the object of the vector graphics of // acquisition shape:
Vargraphic:Graphics=shape.graphic;
// call the picture API of graphic, fill a bitmap bitmapdata, arranging repeat parameter is true:
Graphic.beginBitmapFill (bitmapdata, null, true);
// this bitmap bitmapdata is filled in the region of coordinate (0,0) size bitmapdata.width, bitmapdata.height:
Graphic.drawRect (0,0, bitmapdata.width, bitmapdata.height);
// paint program terminates:
graphic.endFill()��
2. judge whether image can at the unified convergent-divergent of father's layer (i.e. father's layer container or father's container); If it is at his father's layer, its all sub-display objects are carried out unified convergent-divergent, to solve sub-pixelbug problem; If otherwise entering step 3.
Such as: (example code // beginning represents comment line)
// known bitmap object (bitmapdataA, bitmapdataB, father container spriteA)
One variable of // statement called after scaleX value are 1.0006:
VarscaleX:Number=1.0006;
// the horizontal direction that arranges bitmap object bitmapdataA is scaled scaleX, and namely 1.0006:
BitmapdataA.scaleX=scaleX;
// the coordinate of horizontal direction that arranges bitmap object bitmapdataA is 0:
BitmapdataA.x=0;
// the horizontal direction that arranges bitmap object bitmapdataB is scaled scaleX, and namely 1.0006:
BitmapdataB.scaleX=scaleX;
// the coordinate figure of horizontal direction that arranges bitmap object bitmapdataB is: bitmapdataA scale value in the horizontal direction is multiplied by the developed width of bitmapdataA:
BitmapdataB.x=bitmapdataA.scaleX*bitmapdataA.width;
(making into)
One variable of // statement called after scaleX value are 1.0006:
VarscaleX:Number=1.0006;
// arrange display object sprite horizontal direction be scaled scaleX, be 1.0006:
Sprite.scaleX=scaleX.
3. repair the positions and dimensions of object, it is judged that the positions and dimensions of object is the treatable pixel value based on orange red (Twips) corresponding to unit less than in flash whether. Then the positions and dimensions of this object is modified based on the orange red (Twips) pixel value corresponding to unit in this way, to solve sub-pixelbug (sub-pix mistake) problem;
Assume there is display object displayObjectA, displayObjectB, the width of displayObjectA is 345px (pixel), the width of displayObjectB is 456px (pixel), now need display0bjectA is zoomed to 1.006, displayObjectB zooms to 1.007, and then displayObjectA, displayObjectB two show object horizontal arrangement.
Concrete steps:
1) minimum pixel value that can process in flash is calculated: 1 pound=1/72 inch=20 orange reds, assume the screen DPI (abbreviation of DotsPerInch, what per inch printed counts or line number) equal to 72DPI, the minimum pixel value that then can process in flash is 0.05px (pixel), i.e. 1/20 orange red.
2) calculate the actual size of object and be modified: 345px (the width unit picture element of displayObjectA) * 1.006=347.07, (this result can be carried out uncontrollable choice by flash to find the integral multiple of non-zero .05px (pixel), it is that screen sub-pix Problem-Error basic reason occurs), at this moment need to result 347.07 based on 0.05 precision round up, namely the second after the arithmetic point of 347.07 is rounded up, i.e. 347.07=" 347.1.
3) the revised size of object and position are set:
A. the correct scale value scale recalculating displayObjectA is:
Scale=347.1/345;
B. arrange displayObjectA convergent-divergent horizontal direction on be scaled scale:
DisplayObjectA.scaleX=scale;
DisplayObjectA.x=0;
C. the position in the horizontal direction of displayObjectB is set according to the convergent-divergent in the horizontal direction of displayObjectA and displayObjectA position in the horizontal direction:
DisplayObjectB.x=displayObjectA.width*scale+displayObjec tA.x.

Claims (3)

1. the method processed in the enterprising line position figure micro-pixels of flash, it is characterised in that comprise the steps:
(1) if there is sub-pix Problem-Error, it is judged that whether image is simple tile mode; If it is sub-pix Problem-Error is solved by the flashdrawAPI beginBitmapFillAPI method provided; If otherwise entering step (2);
(2) judge whether image can unify convergent-divergent at father's layer; If it is carry out unifying convergent-divergent at his father's layer, to solve sub-pix Problem-Error; If otherwise entering step (3);
(3) positions and dimensions of image is repaired, it is judged that whether the positions and dimensions of image is treatable less than in flash is the pixel value corresponding to unit based on orange red; It is then that the pixel value corresponding to unit is modified to the positions and dimensions of this image based on orange red in this way, to solve sub-pix Problem-Error.
2. the method processed in the enterprising line position figure micro-pixels of flash as claimed in claim 1, it is characterized in that, in step (1), the beginBitmapFillAPI method that described flashdrawAPI provides solves sub-pix Problem-Error, particularly as follows: arranging tile mode by beginBitmapFillAPI method is repetition, namely arranging repeat parameter is that true is to solve sub-pix Problem-Error.
3. the method processed in the enterprising line position figure micro-pixels of flash as claimed in claim 1, it is characterised in that step (3) specifically includes following steps:
A. treatable minimum pixel value in flash is calculated: 1 pound=1/72 inch=20 orange reds, it is assumed that screen DPI is equal to 72DPI, then in flash, treatable minimum pixel value is 0.05px, i.e. 1/20 orange red;
B. calculate the actual size of image and be modified: the size X of image being multiplied by its scaling Y and obtains result M, it has been found that the integral multiple of the non-zero .05px of its result M, at this moment need to this result M based on 0.05 precision round up to obtain result N;
C., size after image correction and position are set: divided by the size X of image, the result N of step B is obtained scaling Y ', comes the size after calculating and setting image correction and position according to this scaling Y '.
CN201010523252.4A 2010-10-28 2010-10-28 A kind of method processed in the enterprising line position figure micro-pixels of flash Active CN102456218B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010523252.4A CN102456218B (en) 2010-10-28 2010-10-28 A kind of method processed in the enterprising line position figure micro-pixels of flash

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010523252.4A CN102456218B (en) 2010-10-28 2010-10-28 A kind of method processed in the enterprising line position figure micro-pixels of flash

Publications (2)

Publication Number Publication Date
CN102456218A CN102456218A (en) 2012-05-16
CN102456218B true CN102456218B (en) 2016-06-08

Family

ID=46039382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010523252.4A Active CN102456218B (en) 2010-10-28 2010-10-28 A kind of method processed in the enterprising line position figure micro-pixels of flash

Country Status (1)

Country Link
CN (1) CN102456218B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5847706A (en) * 1995-11-30 1998-12-08 Hewlett Packard Company Sizeable window for tabular and graphical representation of data
CN101123061A (en) * 2001-05-09 2008-02-13 克雷沃耶提实验室有限公司 Conversion of a sub-pixel format data to another
CN101571954A (en) * 2008-04-29 2009-11-04 奥多比公司 Subpixel registration

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5847706A (en) * 1995-11-30 1998-12-08 Hewlett Packard Company Sizeable window for tabular and graphical representation of data
CN101123061A (en) * 2001-05-09 2008-02-13 克雷沃耶提实验室有限公司 Conversion of a sub-pixel format data to another
CN101571954A (en) * 2008-04-29 2009-11-04 奥多比公司 Subpixel registration

Also Published As

Publication number Publication date
CN102456218A (en) 2012-05-16

Similar Documents

Publication Publication Date Title
CN104898947B (en) A kind of method that GDI electronics map vector scaling and translation are realized based on mouse position
US8982127B2 (en) Computing device and method for establishing three dimensional coordinate system using graphics
CN105138793A (en) Rapid distribution line drawing method
US20100061622A1 (en) Method for aligning objects
CN108734443A (en) A kind of project installation and assembly method, device, system and technological process method
CN104684275A (en) PCB jointing method and system
CN101587504A (en) Custom curved surface test report system and custom surface test report method
CN108705530A (en) Method and system for automatically correcting path of industrial robot
CN103324332B (en) Method for correcting different touch systems
CN102456218B (en) A kind of method processed in the enterprising line position figure micro-pixels of flash
KR101650011B1 (en) Method of setting inspection criteria coordinate by aligning geometry created by 3D scanner
CN104573144A (en) System and method for simulating offline point cloud of measuring equipment
CN110717207B (en) Labeling method, system and storage medium for pipeline design
CN109583145A (en) A kind of assembled architecture design method
CN104035661B (en) A kind of cursor display method and device of ultrahigh resolution combination
CN105786235A (en) Data processing method and electronic device
CN104318610A (en) Method for large-space three-dimensional entity paying off
CN112085814A (en) Electronic map display method, device, equipment and readable storage medium
CN101866242B (en) Method for correcting coordinates of electronic panel displaying, touching and positioning system
CN103324738B (en) A kind of method and apparatus of alignment after webpage zoom on electronic equipment
CN103646412B (en) Wide line describing method and device
CN112256368A (en) Method for quickly adapting Android application screen
Zhen-wei et al. Effective factors analysis on camera calibration
CN115775279B (en) Dispensing positioning method and device and electronic equipment
CN102486700A (en) Demarcation method of linear array camera

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190227

Address after: 201203 7, 1 Lane 666 lane, Zhang Heng Road, Pudong New Area, Shanghai.

Patentee after: SHANGHAI ZHANGMEN TECHNOLOGY CO., LTD.

Address before: 201203 No. 356 GuoShoujing Road, Zhangjiang High-tech Park, Pudong New Area, Shanghai

Patentee before: Shengle Information Technology (Shanghai) Co., Ltd.

TR01 Transfer of patent right