Copy decoded image data and keeps non-decoded pixes as transparent
This commit is contained in:
		
							parent
							
								
									84d3d2a58f
								
							
						
					
					
						commit
						51b2587340
					
				@ -347,6 +347,10 @@ var PDFImage = (function PDFImageClosure() {
 | 
			
		||||
      var rowBytes = (originalWidth * numComps * bpc + 7) >> 3;
 | 
			
		||||
      var imgArray = this.getImageBytes(originalHeight * rowBytes);
 | 
			
		||||
 | 
			
		||||
      // imgArray can be incomplete (e.g. after CCITT fax encoding)
 | 
			
		||||
      var actualHeight = 0 | (imgArray.length / rowBytes *
 | 
			
		||||
                         height / originalHeight);
 | 
			
		||||
 | 
			
		||||
      var comps = this.colorSpace.getRgbBuffer(
 | 
			
		||||
        this.getComponents(imgArray), bpc);
 | 
			
		||||
      if (originalWidth != width || originalHeight != height)
 | 
			
		||||
@ -355,7 +359,7 @@ var PDFImage = (function PDFImageClosure() {
 | 
			
		||||
      var compsPos = 0;
 | 
			
		||||
      var opacity = this.getOpacity(width, height);
 | 
			
		||||
      var opacityPos = 0;
 | 
			
		||||
      var length = width * height * 4;
 | 
			
		||||
      var length = width * actualHeight * 4;
 | 
			
		||||
 | 
			
		||||
      for (var i = 0; i < length; i += 4) {
 | 
			
		||||
        buffer[i] = comps[compsPos++];
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								test/pdfs/issue1658.pdf.link
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								test/pdfs/issue1658.pdf.link
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
https://www.ads.tuwien.ac.at/teaching/archiv/praktika/CherkasskyGoldberg-1995-MaxFlow.pdf
 | 
			
		||||
@ -539,6 +539,15 @@
 | 
			
		||||
      "link": true,
 | 
			
		||||
      "type": "eq"
 | 
			
		||||
    },
 | 
			
		||||
    {  "id": "issue1658",
 | 
			
		||||
      "file": "pdfs/issue1658.pdf",
 | 
			
		||||
      "md5": "b71a0f641e83ad427b8bcfc180899a05",
 | 
			
		||||
      "rounds": 1,
 | 
			
		||||
      "skipPages": [1, 2, 3, 4, 5, 6, 7, 8, 9],
 | 
			
		||||
      "pageLimit": 10,
 | 
			
		||||
      "link": true,
 | 
			
		||||
      "type": "eq"
 | 
			
		||||
    },
 | 
			
		||||
    {  "id": "issue1049",
 | 
			
		||||
      "file": "pdfs/issue1049.pdf",
 | 
			
		||||
      "md5": "15473fffcdde9fb8f3756a4cf1aab347",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user