Fix width / height detection
This commit is contained in:
		
					parent
					
						
							
								554cec2bc7
							
						
					
				
			
			
				commit
				
					
						c4fcee4517
					
				
			
		
					 2 changed files with 10 additions and 2 deletions
				
			
		|  | @ -71,7 +71,9 @@ class Stream extends AbstractData | |||
|         } | ||||
| 
 | ||||
|         if (null !== $displayRatio && null !== $sampleRatio) { | ||||
|             $width = round($width / $sampleRatio[0] * $sampleRatio[1] * $displayRatio[0] / $displayRatio[1]); | ||||
|             if ($sampleRatio[0] !== 1 && $sampleRatio[1] !== 1) { | ||||
|                 $width = round($width / $sampleRatio[0] * $sampleRatio[1] * $displayRatio[0] / $displayRatio[1]); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         return new Dimension($width, $height); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue