diff --git a/src/PelJpeg.php b/src/PelJpeg.php index 556b676a..fe254cf2 100644 --- a/src/PelJpeg.php +++ b/src/PelJpeg.php @@ -402,8 +402,14 @@ public function getExif() */ public function getICC() { - $icc = $this->getSection(PelJpegMarker::APP2); - return $icc; + $skip = 0; + while ($icc = $this->getSection(PelJpegMarker::APP2, $skip)) { + if (str_starts_with($icc->getBytes(), "ICC_PROFILE")) { + return $icc; + } + $skip ++; + } + return null; } /**