Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created November 17, 2020 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/510622a7ac9ecc1d520561229fafaae5 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/510622a7ac9ecc1d520561229fafaae5 to your computer and use it in GitHub Desktop.
Convert DICOM to BMP in Java
DicomImage dicomImage = (DicomImage) Image.load("src/main/resources/image.dcm");
// Resizes the width proportionally.
dicomImage.resizeWidthProportionally(dicomImage.getWidth()* 2, ResizeType.NearestNeighbourResample);
BmpOptions bmpOptions = new BmpOptions();
// Save as BMP
dicomImage.save("src/main/resources/Output/DICOM_to_BMP.bmp", bmpOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment