---
name: "openslide-write-png"
section: "1"
platform: "linux"
package: "openslide"
version: "4.0.1-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/openslide-write-png"
---

# openslide-write-png(1)

Write a region of a virtual slide to a PNG

## NAME

openslide-write-png - Write a region of a virtual slide to a PNG

## SYNOPSIS

**openslide-write-png** \[**--help**\] \[**--version**\] *slide-file x y level width height output-file*

## DESCRIPTION

Write a region of the specified *level* of a virtual slide to a PNG image. *x* and *y* are pixel coordinates in level 0, the highest-resolution slide level. *width* and *height* are pixel dimensions in the specified *level*.

The dimensions of each level of a slide can be obtained with [**openslide-show-properties**(1)](/openslide-show-properties/1.md).

## OPTIONS

- **--help**

  Display usage summary.

- **--version**

  Display version and copyright information.

## EXIT STATUS

**openslide-write-png** returns 0 on success, 1 if an error occurred, or 2 if the arguments are invalid.

## NOTES

**openslide-write-png** is a legacy command and no new features will be added. Its replacement is the **region read** subcommand of [**slidetool**(1)](/slidetool/1.md).

## COPYRIGHT

Copyright © 2007-2026 Carnegie Mellon University and others

OpenSlide is free software: you can redistribute it and/or modify it under the terms of the

OpenSlide comes with NO WARRANTY, to the extent permitted by law. See the GNU Lesser General Public License for more details.

## SEE ALSO

[**openslide-show-properties**(1)](/openslide-show-properties/1.md), [**slidetool**(1)](/slidetool/1.md)
