PatchCodeReaderGetCodeY4 Method (GdPictureImaging)
                In This Topic
            
            
            Returns the Y position (in pixels) of the bottom-left corner of a Patch Code detected by the
            PatchCodeReaderDoScan method.
            
            
            
            Syntax
            
            
            
            
            'Declaration
 
Public Function PatchCodeReaderGetCodeY4( _
   ByVal  As Integer _
) As Integer
             
        
            
            public int PatchCodeReaderGetCodeY4( 
   int 
)
             
        
            
            public function PatchCodeReaderGetCodeY4( 
    : Integer
): Integer; 
             
        
            
            public function PatchCodeReaderGetCodeY4( 
    : int
) : int;
             
        
            
            public: int PatchCodeReaderGetCodeY4( 
   int 
) 
             
        
            
            public:
int PatchCodeReaderGetCodeY4( 
   int 
) 
             
        
             
        
            Parameters
- PatchCodeNo
- Patch Code index. Must be between 1 and PatchCodeReaderGetCodeCount returned
            value.
Return Value
            The Patch Code Y position of the bottom-left corner.
            
 
            
            
            
            
            
            Example
Finding patch codes in an image and writing complete barcodes info into a file.
            
            
             
    
	
		using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg", false);
 
    // Start the patch codes scanning process and write complete information into a text file.
    gdpictureImaging.PatchCodeReaderDoScan(imageID);
 
    using (System.IO.StreamWriter file = new System.IO.StreamWriter("patch codes.txt"))
    {
        int patch codesFound = gdpictureImaging.PatchCodeReaderGetCodeCount();
 
        for (int i = 1; i <= patch codesFound; i++)
        {
            // Patch codes type, possible values are 1, 2, 4, 8, 16 or 32.
            PatchCodeType type = gdpictureImaging.PatchCodeReaderGetCodeType(i);
            file.WriteLine("Patch code type = " + type.ToString());
 
            // The patch code position, given by the coordinates of the corners.
            file.WriteLine("Position =  Top-Left=["
                + gdpictureImaging.PatchCodeReaderGetCodeX1(i) + ", " + gdpictureImaging.PatchCodeReaderGetCodeY1(i)
                + "] Top-Right=[" + gdpictureImaging.PatchCodeReaderGetCodeX2(i) + ", " + gdpictureImaging.PatchCodeReaderGetCodeY2(i)
                + "] Bottom-Right=[" + gdpictureImaging.PatchCodeReaderGetCodeX3(i) + ", " + gdpictureImaging.PatchCodeReaderGetCodeY3(i)
                + "] Bottom-Left=[" + gdpictureImaging.PatchCodeReaderGetCodeX3(i) + ", " + gdpictureImaging.PatchCodeReaderGetCodeY4(i) + "]");
        }
    }
 
    // Release used resources.
    gdpictureImaging.PatchCodeReaderClear();
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
	 
	
 
Example
Finding patch codes in an image and writing complete barcodes info into a file.
            
            using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
            {
                int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg", false);
             
                // Start the patch codes scanning process and write complete information into a text file.
                gdpictureImaging.PatchCodeReaderDoScan(imageID);
             
                using (System.IO.StreamWriter file = new System.IO.StreamWriter("patch codes.txt"))
                {
                    int patch codesFound = gdpictureImaging.PatchCodeReaderGetCodeCount();
             
                    for (int i = 1; i <= patch codesFound; i++)
                    {
                        // Patch codes type, possible values are 1, 2, 4, 8, 16 or 32.
                        PatchCodeType type = gdpictureImaging.PatchCodeReaderGetCodeType(i);
                        file.WriteLine("Patch code type = " + type.ToString());
             
                        // The patch code position, given by the coordinates of the corners.
                        file.WriteLine("Position =  Top-Left=["
                            + gdpictureImaging.PatchCodeReaderGetCodeX1(i) + ", " + gdpictureImaging.PatchCodeReaderGetCodeY1(i)
                            + "] Top-Right=[" + gdpictureImaging.PatchCodeReaderGetCodeX2(i) + ", " + gdpictureImaging.PatchCodeReaderGetCodeY2(i)
                            + "] Bottom-Right=[" + gdpictureImaging.PatchCodeReaderGetCodeX3(i) + ", " + gdpictureImaging.PatchCodeReaderGetCodeY3(i)
                            + "] Bottom-Left=[" + gdpictureImaging.PatchCodeReaderGetCodeX3(i) + ", " + gdpictureImaging.PatchCodeReaderGetCodeY4(i) + "]");
                    }
                }
             
                // Release used resources.
                gdpictureImaging.PatchCodeReaderClear();
                gdpictureImaging.ReleaseGdPictureImage(imageID);
            }
            
            
            
            See Also