Attach (recommended) or Link to PDF file here:
[Test file.pdf](https://github.com/mozilla/pdf.js/files/4656226/Test.file.pdf)

Configuration:
- Web browser and its version: Chrome Version 81.0.4044.138 (Official Build) (64-bit)
- Operating system and its version: Windows 10
- PDF.js version: latest
- Is a browser extension: no

Steps to reproduce the problem:
1. Open [https://mozilla.github.io/pdf.js/web/viewer.html](https://mozilla.github.io/pdf.js/web/viewer.html)
2. Load the provided .pdf file

What is the expected behavior? (add screenshot)
![image](https://user-images.githubusercontent.com/5569382/82438616-02c3fe80-9aa2-11ea-9003-b75ea1e7aac6.png)

What went wrong? (add screenshot)
![image](https://user-images.githubusercontent.com/5569382/82438640-09527600-9aa2-11ea-810b-071da7e37896.png)


imgToPaint = imgData;
      } else {
        tmpCanvas = this.cachedCanvases.getCanvas("inlineImage", width, height);
        tmpCtx = tmpCanvas.context;
        putBinaryImageData(tmpCtx, imgData, this.current.transferMaps);
        imgToPaint = tmpCanvas.canvas;
      }
      let paintWidth = width,
        paintHeight = height;
      let tmpCanvasId = "prescale1";
      
      
      
      while (
        (widthScale > 2 && paintWidth > 1) ||
        (heightScale > 2 && paintHeight > 1)
      ) {
        let newWidth = paintWidth,
          newHeight = paintHeight;
        if (widthScale > 2 && paintWidth > 1) {
          newWidth = Math.ceil(paintWidth / 2);
          widthScale /= paintWidth / newWidth;
        }
        if (heightScale > 2 && paintHeight > 1) {
          newHeight = Math.ceil(paintHeight / 2);
          heightScale /= paintHeight / newHeight;
        }
        tmpCanvas = this.cachedCanvases.getCanvas(
          tmpCanvasId,
          newWidth,