Mam jedno zdjęcie JPEG z osadzonym profilem kolorów. Niektóre przeglądarki internetowe wyświetlają obraz z zastosowanym profilem, inne nie. Jak zastosować profil koloru do obrazu i usunąć profil, aby wszystkie przeglądarki wyświetlały obraz w identyczny sposób.Zastosuj wbudowany profil kolorów do obrazu
próbowałem rozwiązać problem poprzez rozszerzenie ImageMagick, ale obraz nadal wykazują różne w różnych przeglądarkach:
function add_color_profiles($source_path, $target_path){
$all_exts = get_loaded_extensions();
if(!in_array('imagick',$all_exts))
return true;
$im1 = new Imagick($source_path);
$im2 = new Imagick($target_path);
$profiles = $im1->getImageProfiles();
if(!$profiles)
return true;
foreach($profiles as $name => $profile){
$im2->setImageProfile($name,$profile);
}
$im2->writeImage ($target_path);
return true;
}