Skip to content

Commit

Permalink
BUG: JPEG IO: disallow UINT input images
Browse files Browse the repository at this point in the history
UINT input doesn't work, output is broken image
  • Loading branch information
issakomi committed Dec 18, 2021
1 parent f28dcb1 commit b4a6a21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/IO/JPEG/src/itkJPEGImageIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@ JPEGImageIO::Write(const void * buffer)
itkExceptionMacro(<< "JPEG Writer can only write 2-dimensional images");
}

if (this->GetComponentType() != IOComponentEnum::UCHAR && this->GetComponentType() != IOComponentEnum::UINT)
if (this->GetComponentType() != IOComponentEnum::UCHAR)
{
itkExceptionMacro(<< "JPEG supports unsigned char/int only");
itkExceptionMacro(<< "JPEG supports unsigned char only");
}

this->WriteSlice(m_FileName, buffer);
Expand Down

0 comments on commit b4a6a21

Please sign in to comment.