ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / JPEGTexture Class / RowCount Property
Example

In This Topic
    RowCount Property (JPEGTexture)
    In This Topic
    Gets the height of the image in pixels.
    Syntax
    Public Overrides ReadOnly Property RowCount As Integer
    public override int RowCount {get;}
    Example
    Create BasicMaterial with JPEG texture
    {
      // read the jpeg into a buffer
      //At 3.0 you need https://www.nuget.org/packages/Microsoft.Windows.Compatibility
      //System.Drawing
      System.Drawing.Image image = System.Drawing.Image.FromFile(@"C:\temp\myImageFile.jpg");
      MemoryStream memoryStream = new MemoryStream();
    
      System.Drawing.Imaging.ImageFormat format = System.Drawing.Imaging.ImageFormat.Jpeg;
      image.Save(memoryStream, format);
      byte[] imageBuffer = memoryStream.ToArray();
    
      var jpgTexture = new JPEGTexture(imageBuffer);
    
      // texture properties
      int bpp = jpgTexture.BytesPerPixel;
      int columnCount = jpgTexture.ColumnCount;
      int rowCount = jpgTexture.RowCount;
    
      // build the textureResource and the material
      BasicMaterial material = new BasicMaterial();
      material.TextureResource = new TextureResource(jpgTexture);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also