
Gmagick::cyclecolormapimage 함수는 컬러 맵을 cycle 시키는 함수입니다. 이 함수를 사용하려면 먼저 Gmagick 클래스를 사용하여 이미지 파일을 로드해야 합니다.
#hostingforum.kr
php
$image = new Gmagick('image1.png');
cyclecolormapimage 함수를 사용하려면 다음과 같이 사용합니다.
#hostingforum.kr
php
$image->cyclecolormapimage(1, 10);
이 함수의 파라미터는 다음과 같습니다.
- $cycles: 컬러 맵을 cycle 시키는 횟수입니다. 기본값은 1입니다.
- $iterations: 컬러 맵을 cycle 시키는 반복 횟수입니다. 기본값은 1입니다.
위 함수를 사용하여 컬러 맵을 cycle 시키는 예제 코드는 다음과 같습니다.
#hostingforum.kr
php
$image = new Gmagick('image1.png');
$image->cyclecolormapimage(1, 10);
$image->write('output.png');
이 코드는 image1.png 파일을 로드하고 컬러 맵을 cycle 시키는 횟수와 반복 횟수를 지정한 후 output.png 파일로 저장합니다.
2025-03-19 14:44