/** * 图像处理接口(可持久化存储缩略图) * func ImageMogrifyAs(<DestKey>, <SourceImageDownloadURL>, <opts>, <callbackFunc>) => Entry * opts = { * "thumbnail": <ImageSizeGeometry>, * "gravity": <GravityType>, =NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast * "crop": <ImageSizeAndOffsetGeometry>, * "quality": <ImageQuality>, * "rotate": <RotateDegree>, * "format": <DestinationImageFormat>, =jpg, gif, png, tif, etc. * "auto_orient": <TrueOrFalse> * } */ public function ImageMogrifyAs($key, $source_img_url, $opts) { $mogrifyParams = QBox_FileOp_mkImageMogrifyParams($opts); return $this->saveAs($key, $source_img_url, $mogrifyParams); }
function QBox_FileOp_ImageMogrifyPreviewURL($src_img_url, $opts) { return $src_img_url . '?' . QBox_FileOp_mkImageMogrifyParams($opts); }