Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image resizing 从Amazon云调整jpg url的大小以适应我的Claris pro 19门户网站_Image Resizing - Fatal编程技术网

Image resizing 从Amazon云调整jpg url的大小以适应我的Claris pro 19门户网站

Image resizing 从Amazon云调整jpg url的大小以适应我的Claris pro 19门户网站,image-resizing,Image Resizing,我用的是Claris Pro 19 我想把JPG从我们的亚马逊云中拉进来,我有与之关联的URL,但是我在将照片调整到Filemaker Claris上的门户网站时遇到了问题。这些照片有很多。 您能帮忙吗?Filemaker实际上无法以本机方式调整图像大小(即,除非您可以编写javascript或PHP函数,并通过webviewer或从URL脚本步骤插入调用它们) 最好的方法是使用插件。MonkeyBreadSoftware插件的示例如下: #Allow user abort / Set erro

我用的是Claris Pro 19 我想把JPG从我们的亚马逊云中拉进来,我有与之关联的URL,但是我在将照片调整到Filemaker Claris上的门户网站时遇到了问题。这些照片有很多。
您能帮忙吗?

Filemaker实际上无法以本机方式调整图像大小(即,除非您可以编写javascript或PHP函数,并通过webviewer或从URL脚本步骤插入调用它们)

最好的方法是使用插件。MonkeyBreadSoftware插件的示例如下:

#Allow user abort / Set error capture
#-
Set Error Capture [ On ]
Allow User Abort [ Off ]
#-
Set Variable [ $image; Value:Get ( ScriptParameter ) ]
#-
#Load image
Set Variable [ $img; Value:MBS("GMImage.NewFromContainer"; $image) ]
If [ MBS("Iserror") ]
    If [ Get ( LayoutName ) = "NarocilniceLineItems" ]
        Close Window [ Current Window ]
    End If
    Show Custom Dialog [ Message: "error” ]
    Exit Script [ ]
End If
#Scale?
Set Variable [ $ScaleWidth; Value:GetAsNumber(640) ]
Set Variable [ $ScaleHeight; Value:GetAsNumber(640) ]
Set Variable [ $DoScale; Value:0 ]
If [ $ScaleWidth > 0 ]
    If [ $ScaleHeight > 0 ]
        Set Variable [ $Scale; Value:GetAsText($ScaleWidth) & "x" & GetAsText($ScaleHeight)]
    Else
        Set Variable [ $Scale; Value:GetAsText($ScaleWidth)]
    End If
    Set Variable [ $r; Value:MBS( "GMImage.Scale"; $img; $Scale ) ]
End If
#Clear profiles
Set Variable [ $r; Value:MBS( "GMImage.SetICCColorProfile"; $img; "" ) ]
Set Variable [ $r; Value:MBS( "GMImage.Setprofile"; $img; "IPTC"; "" ) ]
Set Variable [ $r; Value:MBS( "GMImage.Setprofile"; $img; "ICM"; "" ) ]
#query size
Set Variable [ $dest_width; Value:MBS( "GMImage.GetWidth"; $img) ]
Set Variable [ $dest_height; Value:MBS( "GMImage.GetHeight"; $img) ]
#For JPEG make a copy without alpha channel
Set Variable [ $secondImage; Value:MBS( "GMImage.New"; $dest_width & "x" & $dest_height; "white" ) ]
#6 = RGB without alpha
Set Variable [ $r; Value:MBS( "GMImage.SetType"; $secondImage; 6 )]
Set Variable [ $r; Value:MBS( "GMImage.CompositeXY"; $secondImage; $img; 0; 0; 1 ) ]
#JPEG with RGB
#70% quality
Set Variable [ $r; Value:MBS( "GMImage.SetQuality"; $secondImage; 70 ) ]
Set Variable [ $final_image; Value:$secondImage ]
#Cleanup
Set Variable [ $r; Value:MBS("GMImage.Destroy"; $img) ]
Exit Script [ Result: $final_image ]
这是一个打印出来的脚本示例,我使用上面提到的插件来减小图像的大小。只要图像存储在容器中并作为参数传递到脚本中,它就应该工作。 我希望这对你有所帮助