
Imagick::getImageProfile 함수는 이미지의 프로파일을 반환하는 함수로, 프로파일은 배열 형식으로 반환됩니다. 이 배열에는 프로파일의 이름과 값이 포함되어 있습니다.
예를 들어, 다음과 같이 코드를 작성할 수 있습니다.
#hostingforum.kr
php
$image = new Imagick('image.jpg');
$profile = $image->getImageProfile();
print_r($profile);
이 코드를 실행하면, 이미지의 프로파일이 배열 형식으로 출력됩니다.
프로파일을 사용하려면, 프로파일의 이름과 값을 확인하고, 필요한 경우 프로파일을 수정하거나 추가할 수 있습니다.
Imagick::setImageProfile 함수를 사용하여 이미지의 프로파일을 다시 적용할 수 있습니다.
#hostingforum.kr
php
$image = new Imagick('image.jpg');
$profile = $image->getImageProfile();
// 프로파일을 수정하거나 추가합니다.
$profile['ICC_Profile'] = '새로운 프로파일 값';
$image->setImageProfile($profile);
$image->writeImage('새로운 이미지.jpg');
이 코드를 실행하면, 이미지의 프로파일이 수정된 새로운 이미지로 저장됩니다.
2025-06-21 16:21