> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Display person image

> How to display a person's image using web services.

Displaying a person's picture involves using the DCF `ImageUtility` to load the image via the web service, and then rendering the output in some way.

Here is an example of a web page that renders a person's image to PNG.

```csharp theme={null}
int personId = 123;
int minWidth = 100;
int minHeight = 100;
int maxWidth = 1000;
int maxHeight = 1000;

ImageSize imageSize = new ImageSize( minWidth, minHeight, maxWidth, maxHeight);
FallbackStrategy fallbackStrategy = FallbackStrategy.SrNoPhoto;
bool border = true;
Color borderColor = Color.CadetBlue;

Image image = ImageUtility.GetPersonImage(_personId, imageSize, fallbackStrategy, border, borderColor);
if (image != null)
{
  Response.ContentType = "image/png";
  Encoder Enc = Encoder.RenderMethod;
  EncoderParameters EncParms = new EncoderParameters(1);
  EncoderParameter EncParm = new EncoderParameter(Enc, (byte)EncoderValue.RenderNonProgressive);
  EncParms.Param[0] = EncParm;

  MemoryStream ms = new MemoryStream();
  _image.Save(ms, ImageUtility.GetEncoderInfo("image/png"), EncParms);
  int bufferSize = SuperOffice.Configuration.ConfigFile.Documents.BufferSize * 1024;
  byte[] buffer = new byte[bufferSize];
  ms.Position = 0;
  int readBytes = 0;
  do
  {
    readBytes = ms.Read(buffer, 0, bufferSize);
    Response.OutputStream.Write(buffer, 0, readBytes);
    Response.OutputStream.Flush();
  }
  while (readBytes == bufferSize);
}
```


## Related topics

- [Contact (person)](/en/contact/dev/index.md)
- [Display a person's picture](/en/api/web-services/howto/contact/get-person-image-rest.md)
- [How to display an image from the Blob table (services)](/en/api/web-services/howto/contact/display-image-from-blob-table-services.md)
- [Get a person's image](/en/api/web-services/howto/contact/get-person-image-options.md)
- [Get Person Images](/en/api/reference/restful/agent/person_agent/get-person-images.md)
- [Set Person Image](/en/api/reference/restful/agent/person_agent/set-person-image.md)
