image 套件

import "google.golang.org/appengine/image"

簡介

image 套件可提供圖片服務。

索引

func DeleteServingURL(c context.Context, key appengine.BlobKey) error
func ServingURL(c context.Context, key appengine.BlobKey, opts *ServingURLOptions) (*url.URL, error)
type ServingURLOptions

func DeleteServingURL

func DeleteServingURL(c context.Context, key appengine.BlobKey) error

DeleteServingURL 可刪除提供圖片的網址。

func ServingURL

func ServingURL(c context.Context, key appengine.BlobKey, opts *ServingURLOptions) (*url.URL, error)

ServingURL 傳回的網址將透過 Blobstore 提供圖片。

type ServingURLOptions

type ServingURLOptions struct {
    Secure bool // whether the URL should use HTTPS

    // Size must be between zero and 1600.
    // If Size is non-zero, a resized version of the image is served,
    // and Size is the served image's longest dimension. The aspect ratio is preserved.
    // If Crop is true the image is cropped from the center instead of being resized.
    Size int
    Crop bool
}
本頁內容對您是否有任何幫助?請提供意見:

傳送您對下列選項的寶貴意見...

這個網頁
Go 適用的 App Engine 標準環境