Browse Source

Prefer Math.DivRem

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

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

@ -1530,9 +1530,10 @@ internal sealed class JxlDecoderCore : ImageDecoderCore, IDisposable
long totalBits = bitReader.TotalBitsConsumed;
this.AdvanceCodeStream(totalBits / JxlMath.BitsPerByte);
(long div, long rem) = Math.DivRem(totalBits, JxlMath.BitsPerByte);
this.AdvanceCodeStream(div);
this.codestreamBitsAhead = totalBits % JxlMath.BitsPerByte;
this.codestreamBitsAhead = rem;
this.gotBasicInfo = true;
this.basicInfoSizeHint = 0;
this.imageMetadata = this.metadata.ImageMetadata;

Loading…
Cancel
Save