GenericTools.dev
  • Tools
  • Guides
  • Privacy
  • About
  • Contact
Guide · Updated July 2026

DICOM to PNG conversion: pixels, windowing and privacy

DICOM is a medical data format that can contain pixel data plus clinical metadata. PNG is a display image. Converting between them is a rendering and export step, not a clinically equivalent transformation.

Why a DCM file is not an ordinary photograph

A DICOM object may describe modality, study, series, acquisition geometry, calibration, patient-related attributes and one or more image frames. Pixel samples can have greater precision than a normal screen image and may be compressed. A PNG captures a rendered appearance but normally discards the structured context needed by medical viewers, measurements and workflows. Keep the original DICOM as the source record.

From stored samples to visible brightness

Rendering can apply rescale parameters and a value-of-interest transformation before mapping samples to display shades. Window center and width select a useful range; values outside it are clipped. The same scan can therefore produce visibly different PNGs under different windows without changing the underlying pixel samples. Automatically selected windowing is convenient for preview, but it may not match a radiologist's preferred preset or a diagnostic workstation.

Photometric interpretation and color

DICOM attributes describe how stored samples should be interpreted. Some grayscale images use lower values as white rather than black. Color images may require conversion from another color space. A converter must use DICOM-aware rendering rather than simply copying bytes into an image library, or the result may appear inverted, washed out or incorrectly colored.

Multi-frame studies

A single DICOM object can contain multiple frames, such as an ultrasound sequence or slices in an enhanced object. A converter that exports only the first frame produces one preview, not the whole study. Before using an exported PNG, check the frame count and document which frame was selected. A series of separate DICOM files is another common arrangement and requires ordering by DICOM attributes, not filename alone.

Metadata and patient privacy

DICOM files can contain names, identifiers, dates, institution information and other protected data. Removing visible text from a screenshot does not de-identify the source file, and identifying text may also be burned into the pixels. Use only synthetic or properly de-identified files with an online converter. Follow your organization's privacy, retention and authorization requirements; do not upload clinical records merely for convenience.

Conversion workflow

  1. Work from a copy and preserve the original DICOM object.
  2. Confirm that the file contains image pixel data and note its modality and frame count.
  3. Remove or anonymize metadata using an approved process, including review for burned-in identifiers.
  4. Render with a DICOM-aware library and choose a suitable window or presentation state.
  5. Export the required frame at a resolution and bit depth appropriate for its non-diagnostic purpose.
  6. Visually compare the output with a trusted DICOM viewer.

Troubleshooting output

  • Black or white image: the selected display range may not cover useful pixel values.
  • Inverted image: photometric interpretation was not applied correctly.
  • Unsupported transfer syntax: the decoder lacks the codec used by the file.
  • Only one image exported: the object or study contains additional frames or instances.
  • Unexpected orientation: patient-orientation metadata was ignored during export.

Appropriate use

The GenericTools.dev DICOM to PNG converter is intended for development, support and non-diagnostic preview workflows. Its PNG output is not a replacement for a regulated diagnostic viewer, the original study, calibration, annotations or clinical judgment.

Create a non-diagnostic DICOM preview → · All developer guides

© 2026 GenericTools.dev
Privacy Policy Terms of Use Guides About Contact