ArcGIS Pro 2.7 API Reference Guide
JPEGTexture Constructor(Byte[])
Example 

ArcGIS.Core.Geometry Namespace > JPEGTexture Class > JPEGTexture Constructor : JPEGTexture Constructor(Byte[])
The buffer with a valid JPEG image. The created object references the buffer.
Initializes a new instance of the JPEGTexture class from the given buffer.
Syntax
public JPEGTexture( 
   byte[] buffer
)
Public Function New( _
   ByVal buffer() As Byte _
)

Parameters

buffer
The buffer with a valid JPEG image. The created object references the buffer.
Remarks
Don't change the buffer after creating a texture from it.
Example
// read the jpeg into a buffer
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 10, Windows 8.1

See Also

Reference

JPEGTexture Class
JPEGTexture Members
Overload List