+ private function _hasAltiProfile($path) {
+ if (!extension_loaded('gd')) {
+ return false;
+ }
+ $cachefile = $path->getProfileCache('small');
+ if (file_exists($cachefile)) {
+ return filesize($cachefile) != 0;
+ }
+
+ try {
+ $service = $this->_helper->SyjAltiService->service();
+ } catch(Exception $e) {
+ return false;
+ }
+
+ try {
+ $path->getAltiProfile($service, 2 / 100);
+ return true;
+ } catch(Syj_Exception_NotImplemented $e) {
+ @touch($cachefile);
+ return false;
+ } catch(Exception $e) {
+ return false;
+ }
+ }
+