<div>Hi,</div>
<div> </div>
<div>I meet a run-time problem when I try to read the jpg format file and save it as png. I just simulate the coding in itkPNGImageIOTest.cxx. </div>
<div>The problem may happen in the coding below</div>
<div> </div>
<div>// Read in the image<br> itk::PNGImageIO::Pointer io;<br> io = itk::PNGImageIO::New();</div>
<div> itk::ImageFileReader<RGBImageType>::Pointer PNGreader;<br> PNGreader = itk::ImageFileReader<RGBImageType>::New();<br> PNGreader->SetFileName( "demoMeanFilter.jpg" );<br> PNGreader->SetImageIO(io);<br>
PNGreader->Update();</div>
<div> itk::ImageFileWriter<OutputImageType>::Pointer PNGwriter;<br> PNGwriter = itk::ImageFileWriter<OutputImageType>::New();<br> PNGwriter->SetInput(PNGreader->GetOutput());<br> PNGwriter->SetFileName("demoMeanFilter.png" );<br>
PNGwriter->SetImageIO(io);<br> PNGwriter->Write();</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>Jihang</div>