dououde4065
dououde4065
2013-12-11 12:28

如何从画布中获取图像大小?

已采纳

Is it possible to get the image size in pixels from a canvas?

E.g. I know I can achieve it getting the size from the image directly:

list($width, $height) = @getimagesize($_FILES['inputFieldName']['tmp_name'])

but I want to get it from a canvas. E.g.:

$canvas = imagecreatefromjpeg($image_path);
//Get image size from $canvas
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答