public function testExif() { $exif = new Qiniu_Exif(); $url = $this->url; $expectedUrl = $url . '?exif'; $this->assertEquals($exif->MakeRequest($url), $expectedUrl); }
//$baseUrl 就是您要访问资源的地址 $baseUrl = Qiniu_RS_MakeBaseUrl($domain, $key1); # @endgist # @gist image_info $getPolicy = new Qiniu_RS_GetPolicy(); $imgInfo = new Qiniu_ImageInfo(); //生成fopUrl $imgInfoUrl = $imgInfo->MakeRequest($baseUrl); //对fopUrl 进行签名,生成privateUrl。 公有bucket 此步可以省去。 $imgInfoPrivateUrl = $getPolicy->MakeRequest($imgInfoUrl, null); echo "\n\n====> imageInfo privateUrl: \n"; echo $imgInfoPrivateUrl . "\n"; # @endgist # @gist image_exif $getPolicy = new Qiniu_RS_GetPolicy(); $imgExif = new Qiniu_Exif(); //生成fopUrl $imgExifUrl = $imgExif->MakeRequest($baseUrl); //对fopUrl 进行签名,生成privateUrl。 公有bucket 此步可以省去。 $imgExifPrivateUrl = $getPolicy->MakeRequest($imgExifUrl, null); echo "\n\n====> imageView privateUrl: \n"; echo $imgExifPrivateUrl . "\n"; # @endgist # @gist image_view $getPolicy = new Qiniu_RS_GetPolicy(); $imgView = new Qiniu_ImageView(); $imgView->Mode = 1; $imgView->Width = 60; $imgView->Height = 30; //生成fopUrl $imgViewUrl = $imgView->MakeRequest($baseUrl);