1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-25 14:50:48 +02:00

Fix incorrect resolution conversion (#1411)

* Assert resolution x/y result

* Fix Resolution conversion
This commit is contained in:
Oliver Vogel
2025-01-04 08:31:13 +01:00
committed by GitHub
parent 116bd03bc6
commit 436460e33b
6 changed files with 34 additions and 21 deletions

View File

@@ -17,10 +17,12 @@ final class ResolutionAnalyzerTest extends ImagickTestCase
{
public function testAnalyze(): void
{
$image = $this->readTestImage('tile.png');
$image = $this->readTestImage('300dpi.png');
$analyzer = new ResolutionAnalyzer();
$analyzer->setDriver(new Driver());
$result = $analyzer->analyze($image);
$this->assertInstanceOf(Resolution::class, $result);
$this->assertEquals(300, round($result->perInch()->x()));
$this->assertEquals(300, round($result->perInch()->y()));
}
}