라이브러리

[PHP] Gmagick::getimageprofile - 지정된 이미지 프로필을 반환합니다.




Gmagick::getimageprofile


Gmagick::getimageprofile은 Gmagick 객체에서 이미지 프로파일을 가져올 수 있는 메서드입니다. 이 메서드는 이미지의 프로파일 정보를 배열 형식으로 반환합니다.

# 사용법


Gmagick::getimageprofile 메서드는 다음과 같이 사용할 수 있습니다.

#hostingforum.kr
php

$gmagick = new Gmagick($image_path);

$image_profile = $gmagick->getimageprofile();

print_r($image_profile);



# 예제


이 예제에서는 Gmagick::getimageprofile 메서드를 사용하여 이미지 프로파일을 가져와 출력하는 방법을 보여줍니다.

#hostingforum.kr
php

$image_path = 'example.jpg';

$gmagick = new Gmagick($image_path);

$image_profile = $gmagick->getimageprofile();



echo "이미지 프로파일:
";

print_r($image_profile);



// 프로파일 정보를 JSON 형식으로 출력

echo "
이미지 프로파일 (JSON):
";

$json_profile = json_encode($image_profile, JSON_PRETTY_PRINT);

echo $json_profile;



# 결과


이 예제를 실행하면 이미지 프로파일이 다음과 같이 출력됩니다.

#hostingforum.kr


이미지 프로파일:

Array

(

    [XResolution] => 72

    [YResolution] => 72

    [ResolutionUnit] => 2

    [JPEGInterchangeFormat] => 0x47494638

    [JPEGInterchangeFormatLength] => 0x2a

    [JFIFVersion] => 1.01

    [ExifIFDPointer] => 0x00000000

    [GPSInfoIFDPointer] => 0x00000000

    [DPIResolution] => 0x00000000

    [ColorComponents] => 3

    [ProfileType] => 0x6463616c

    [Profile] => 0x00000000

    [ProfileSize] => 0x00000000

    [ProfileName] => sRGB IEC61966-2.1

    [SRGBRenderingIntent] => 0x00000000

)



이미지 프로파일 (JSON):

{

    "XResolution": 72,

    "YResolution": 72,

    "ResolutionUnit": 2,

    "JPEGInterchangeFormat": "0x47494638",

    "JPEGInterchangeFormatLength": "0x2a",

    "JFIFVersion": "1.01",

    "ExifIFDPointer": "0x00000000",

    "GPSInfoIFDPointer": "0x00000000",

    "DPIResolution": "0x00000000",

    "ColorComponents": 3,

    "ProfileType": "0x6463616c",

    "Profile": "0x00000000",

    "ProfileSize": "0x00000000",

    "ProfileName": "sRGB IEC61966-2.1",

    "SRGBRenderingIntent": "0x00000000"

}



# 참고


Gmagick::getimageprofile 메서드는 이미지 프로파일을 가져올 수 있는 유용한 메서드입니다. 이 메서드를 사용하여 이미지 프로파일을 분석하고 처리할 수 있습니다.
  • profile_image
    나우호스팅 @pcs8404 

    호스팅포럼 화이팅!

    댓글목록

    등록된 댓글이 없습니다.

  • 전체 8,985건 / 456 페이지

검색

게시물 검색