Php 获取户外图像上的图像大小

Php 获取户外图像上的图像大小,php,alfresco,Php,Alfresco,我正在为一个充满图片的露天建筑做正面展示 我正在构建我的图片url,如下所示: 其中myHost是服务器,myTicket是在此url生成的票证: http://myHost.com:8080/alfresco/service/api/login?u=login&pw=password 图片使用此url正确显示,但我想使用phpthumb调整其大小,当我尝试在图片上使用它时,脚本和以下日志中出现http 500错误: PHP Warning: getimagesize(http:/

我正在为一个充满图片的露天建筑做正面展示

我正在构建我的图片url,如下所示:

其中myHost是服务器,myTicket是在此url生成的票证:

http://myHost.com:8080/alfresco/service/api/login?u=login&pw=password
图片使用此url正确显示,但我想使用phpthumb调整其大小,当我尝试在图片上使用它时,脚本和以下日志中出现http 500错误:

PHP Warning:  getimagesize(http://myHost.com:8080/share/proxy/alfresco-noauth/api/node/content/workspace/SpacesStore/bf0a8b21-b8d9-487d-a529-dee8c49d7c6f/filetitle.jpg?alf_ticket=myTicket): failed to open stream: HTTP request failed! HTTP/1.1 401 Non-Autorisé

我不应该点击authentication,因为我的链接有一张有效的票证(当我正常显示我的图片时我不会点击authentication)

正如杰夫所说,Alfresco已经创建了缩略图。因此,您可能可以使用:

描述自alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.Desc.xml

  <url>/api/node/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}?c={queueforcecreate?}&amp;ph={placeholder?}</url>  
  <url>/api/path/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}?c={queueforcecreate?}&amp;ph={placeholder?}</url>
  <url>/api/node/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}/{filename}?c={queueforcecreate?}&amp;ph={placeholder?}</url>  
  <url>/api/path/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}/{filename}?c={queueforcecreate?}&amp;ph={placeholder?}</url>
/api/node/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}?c={queueforcecreate?}&;ph={占位符?}
/api/path/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}?c={queueforcecreate?}&;ph={占位符?}
/api/node/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}/{filename}?c={queueforcecreate?}&;ph={占位符?}
/api/path/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}/{filename}?c={queueforcecreate?}&;ph={占位符?}

您尝试从共享代理URL而不是直接从Alfresco URL获取图像有什么原因吗?可能不完全适合您的使用情况,但为了以防万一,Alfresco可以为您的图像自动生成各种缩略图,您只需配置它即可。然后你可以根据自己的需要选择合适的格式副本,而不是动态调整大小。我对Alfresco完全陌生,我使用这个URL是因为我发现它是唯一一个只显示图片的URL。这是个坏习惯吗?我将在Alfresco中查找这些缩略图配置,谢谢Hanks,我得到了拇指,但在Alfresco admin中,我无法找到为默认拇指设置宽度/高度的位置拇指是由imagemagick创建的。你需要进一步挖掘才能使拇指保持原样。你不能用width=和height=来缩放HTML文件中的缩略图吗?我需要将打印图像的大小调整为更适合网络的大小(810px宽度),但实际缩略图太小,无法用HTML来调整大小并获得良好的结果,但810px不是缩略图:),你可以对实际图像执行此操作,对吗?我真的不想要缩略图,只是图片上的一个调整大小(这个调整大小是一种安全措施,因为客户是一家印刷广告公司,在他们的视觉上有着巨大的尺寸),我正试图通过alfresco的缩略图系统,因为我无法用phpthumb来做这件事,因为前面提到的401问题。