라이브러리
[PHP] Imagick::setImageProfile - Imagick 객체에 명명된 프로필을 추가합니다.
Imagick::setImageProfile
Imagick::setImageProfile 메소드는 이미지 프로파일을 설정하는 데 사용됩니다. 이 메소드는 이미지에 프로파일을 추가하거나 수정할 수 있습니다. 프로파일은 이미지에 대한 추가 정보를 포함할 수 있습니다, 예를 들어, EXIF 데이터, IPTC 데이터, XMP 데이터 등.
Imagick::setImageProfile 사용 예제
#hostingforum.kr
php
// Imagick 클래스의 인스턴스를 생성합니다.
$image = new Imagick('example.jpg');
// 프로파일 이름을 정의합니다.
$profileName = 'Exif';
// 프로파일 데이터를 정의합니다.
$profileData = array(
'Make' => 'Canon',
'Model' => 'Canon EOS 5D',
'Orientation' => 1,
'XResolution' => 72,
'YResolution' => 72,
'ResolutionUnit' => 2,
'Software' => 'Adobe Photoshop CS6 (Windows)',
'DateTime' => '2013:09:12 14:30:00',
'YCbCrPositioning' => 1,
'ExifIFDPointer' => 0x8769,
'GPSInfoIFDPointer' => 0x8825,
'MakernoteIFDPointer' => 0x927c,
'InteropIFDPointer' => 0xa000,
'SensingMethod' => 2,
'FileSource' => 3,
'CustomRendered' => 0,
'ExposureMode' => 0,
'WhiteBalance' => 0,
'DigitalZoomRatio' => 0,
'FNumber' => 5.6,
'ExposureTime' => 0.008333333333333333,
'MeteringMode' => 5,
'Flash' => 24,
'FocalLength' => 24,
'SceneCaptureType' => 0,
'ColorSpace' => 1,
'ExifImageWidth' => 3008,
'ExifImageLength' => 2000,
'SensingMethod' => 2,
'FileSource' => 3,
'CustomRendered' => 0,
'ExposureMode' => 0,
'WhiteBalance' => 0,
'DigitalZoomRatio' => 0,
'FNumber' => 5.6,
'ExposureTime' => 0.008333333333333333,
'MeteringMode' => 5,
'Flash' => 24,
'FocalLength' => 24,
'SceneCaptureType' => 0,
'ColorSpace' => 1,
'ExifImageWidth' => 3008,
'ExifImageLength' => 2000,
);
// setImageProfile 메소드를 사용하여 프로파일을 설정합니다.
$image->setImageProfile($profileName, $profileData);
// 이미지 프로파일을 확인합니다.
$profile = $image->getImageProfile($profileName);
// 프로파일을 출력합니다.
print_r($profile);
이 예제에서는 `setImageProfile` 메소드를 사용하여 EXIF 프로파일을 설정하고, 이미지 프로파일을 확인하고, 프로파일을 출력하는 방법을 보여줍니다.
-
- 나우호스팅 @pcs8404
-
호스팅포럼 화이팅!
댓글목록
등록된 댓글이 없습니다.