Dicom Resize Bug

Aspose Imaging 17.12.

Loading an DICOM image and saving it to PNG works as expected:

Image image = Image.load("…");
image.save("…", new PNGOptions());

but saving the file fails if I resize the image before:

Image image = Image.load("…");
image.resizeHeightProportionally(300, ResizeType.LanczosResample);
image.save("…", new PNGOptions());

@thomas.winklehner,

I have observed the issue statement shared by you and request you to please share the source and generated output file for reference. We will be able to investigate the issue further on our end on provision of requested information.

As requested here is the code to reproduce the issue (MacOSX, Linux, JDK 1.8). I attached the test image.

IM-0001-0001.dcm.zip (38.2 KB)

public class DcmTest {

public static void DcmTestWorks()
{
    try {
        Image image = Image.load("IM-0001-0001.dcm");
        
        image.save(new FileOutputStream("IM-0001-0001.png"), new PngOptions());

        image.dispose();

    } catch (Exception e) {
        e.printStackTrace();
    }

}

public static void DcmTestFails()
{
    try {
        Image image = Image.load("IM-0001-0001.dcm");

        image.resizeHeightProportionally(300, ResizeType.LanczosResample);

        image.save(new FileOutputStream("IM-0001-0001.png"), new PngOptions());

        image.dispose();

    } catch (Exception e) {
        e.printStackTrace();
    }

}


public static void main(String[] args) {
    
    DcmTestFails();
    
}
}

@thomas.winklehner,

I have worked with source code and sample file shared by you. Can you please also share your generated result so that we may further investigate to help you out.

As requested, please find the generated PNG file attached.

IM-0001-0001.png (45 Bytes)

@thomas.winklehner,

I have worked with the source file shared by you and have been able to observe the issue. An issue with ID IMAGINGJAVA-909 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed. We will share good news with you soon.

The issues you have found earlier (filed as IMAGINGJAVA-909) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by mudassir.fayyaz