<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&lt;RGBImageType&gt;::Pointer PNGreader;<br>  PNGreader = itk::ImageFileReader&lt;RGBImageType&gt;::New();<br>  PNGreader-&gt;SetFileName( &quot;demoMeanFilter.jpg&quot; );<br>  PNGreader-&gt;SetImageIO(io);<br>
  PNGreader-&gt;Update();</div>
<div>  itk::ImageFileWriter&lt;OutputImageType&gt;::Pointer PNGwriter;<br>  PNGwriter = itk::ImageFileWriter&lt;OutputImageType&gt;::New();<br>  PNGwriter-&gt;SetInput(PNGreader-&gt;GetOutput());<br>  PNGwriter-&gt;SetFileName(&quot;demoMeanFilter.png&quot; );<br>
  PNGwriter-&gt;SetImageIO(io);<br>  PNGwriter-&gt;Write();</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>Jihang</div>