After RT, lettering, I'd like to engrave all the point coordinates, the content of the preserved, how to achieve this? Need to what kind of knowledge? Or paid help realize functions
CodePudding user response:
Engraving is what? Is to call the hardware carved stone or software to generate images?
CodePudding user response:
reference 1st floor desperaso response: lettering is what? Is to call the hardware carved stone or software to generate images? GDI + lettering on the image CodePudding user response:
Add pictures on the fixed position of text, and then put all the text point coordinates are preserved, CodePudding user response:
Coordinates according to the color of the word, the word is red, for example, a red point coordinates in the array Public class Dot { Public Point Point; Public Dot (Point p) {Point=p; } } Public static List Dots=new List (a); ///& lt; Summary> ///save the specified color///& lt;/summary> ///& lt; Param name="SRC" & gt; Image & lt;/param> ///& lt; Param name="tr" & gt; R value & lt;/param> ///& lt; Param name="tg" & gt; G value & lt;/param> ///& lt; Param name="TB" & gt; B value & lt;/param> ///& lt; Returns> Public void GetRGB (Bitmap SRC, int tr, tg int, int TB) { Int w=SRC. Width; Int h=SRC. Height; System. Drawing. Imaging. BitmapData srcData=https://bbs.csdn.net/topics/src.LockBits (new Rectangle (0, 0, w, h), System. Drawing. The Imaging. ImageLockMode. ReadOnly, System. Drawing. The Imaging. PixelFormat. Format32bppArgb); The unsafe { Byte * pIn=(byte *) srcData Scan0. ToPointer (); Byte * p; Int stride=srcData. Stride; Int r, g, b. For (int y=0; Y & lt; h; Y++) { For (int x=0; X & lt; w; X++) { P=the pIn; B=pIn [0]; G=the pIn [1]; R=pIn [2]; If (r==tr & amp; & G==tg & amp; & B==TB) {dots. The Add (new Dot (new Point (x, y))); } PIn +=4; } PIn +=srcData. Stride - w * 4; } } The SRC. UnlockBits (srcData); } CodePudding user response:
If if the background color of a lot of, may and the color of the word repetition, so 1, create a new bitmap, then the lettering, record the location, 2, the carved bitmap using DrawImage to the background image, CodePudding user response:
reference 5 floor desperaso reply: if if the background color of a lot of, may and the color of the word repetition, so 1, create a new bitmap, then the lettering, record the location, 2, the carved bitmap using DrawImage to the background image, Thank you very much, this is the tabernacle? Just this kind of pigment extraction accuracy? I tried to get coordinates by extracting pigment, but it seems not very accurate, I use GDI drawing ABC, take a red pigment coordinates with extraction of pigment, according to the drawing to get the coordinates of the point, again drawing is not complete, may be the place where I judge red written is not correct? I am a judge by R=255 CodePudding user response:
refer to 6th floor jun517 response: thank you very much, this is the tabernacle? Just this kind of pigment extraction accuracy? I tried to get coordinates by extracting pigment, but it seems not very accurate, I use GDI drawing ABC, take a red pigment coordinates with extraction of pigment, according to the drawing to get the coordinates of the point, again drawing is not complete, may be the place where I judge red written is not correct? I am a judge by R=255 Slowly with GetPixel, if you feel not only RGB color, according to the RGB, other color did not know CodePudding user response:
If the lettering with anti-alias, have to take the edge color, more CodePudding user response:
Seems to be a problem, or to establish a transparent background, reproduction on transparent background map Scan the transparent region can, (commonly known as the keyer, film dig like a blue cloth, green cloth, they can't find the transparent cloth, we can directly use transparent color) This is also a general process of making the different shape,