Browse Source

Use Math.DivRem

pull/3153/head
winscripter 2 days ago
parent
commit
de8c644335
  1. 6
      src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlDecoderCore.cs

6
src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlDecoderCore.cs

@ -1565,8 +1565,10 @@ internal sealed class JxlDecoderCore : ImageDecoderCore, IDisposable
}
long totalBits = reader.TotalBitsConsumed;
this.AdvanceCodeStream(totalBits / JxlMath.BitsPerByte);
this.codestreamBitsAhead = totalBits % JxlMath.BitsPerByte;
(long div, long rem) = Math.DivRem(totalBits, JxlMath.BitsPerByte);
this.AdvanceCodeStream(div);
this.codestreamBitsAhead = rem;
this.gotTransformData = true;
}

Loading…
Cancel
Save