Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/newsolver' into newsolver
Browse files Browse the repository at this point in the history
  • Loading branch information
trautmane committed Nov 13, 2024
2 parents c6a9aa6 + 9884e74 commit 08acf12
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ public static ShortProcessor convert16bit( final ShortProcessor currentProcessor
{
final short[] array = (short[])currentProcessor.getPixels();

for ( int i = 0; i < array.length; ++i )
array[ i ] = UnsignedShortType.getCodedSignedShort( 32768 - array[ i ] );
for (int i = 0; i < array.length; ++i) {
final short value = array[i];
array[i] = (value == 0) ? 0 : UnsignedShortType.getCodedSignedShort(32768 - array[i]);
}

return currentProcessor;
}
Expand Down

0 comments on commit 08acf12

Please sign in to comment.