Documentation ¶
Index ¶
- Variables
- func ConvertUrlToPath(fnUrl string) (fn string)
- func GenThumbnail(fns []string, width, height, owidth, oheight int, to string) error
- func GetImageDimension(imagePath string) (width int, height int)
- func SetupMux(mux *ymux.ServeMux)
- func SetupThumbnail(cfg *ThumbnailType, xcfg *ymux.BaseConfigType, dbF map[string]bool, f *os.File)
- func ThumbnailImage(www http.ResponseWriter, req *http.Request)
- func ThumbnailURL(www http.ResponseWriter, req *http.Request)
- type ThumbnailType
Constants ¶
This section is empty.
Variables ¶
View Source
var DbOn map[string]bool
Functions ¶
func ConvertUrlToPath ¶
func GenThumbnail ¶
func GetImageDimension ¶
GetImageDimension returns width, height of an immage - .png, .jpg, .gif
- not working on .svg
- not returning errors
Example:
h, w = GetHWFromImage ( ffile_name );
func SetupThumbnail ¶
func SetupThumbnail(cfg *ThumbnailType, xcfg *ymux.BaseConfigType, dbF map[string]bool, f *os.File)
func ThumbnailImage ¶
func ThumbnailImage(www http.ResponseWriter, req *http.Request)
Returns a Thumbnail for an image
func ThumbnailURL ¶
func ThumbnailURL(www http.ResponseWriter, req *http.Request)
Types ¶
type ThumbnailType ¶
type ThumbnailType struct { ThumbnailPath string `json:"thumbnail_path" default:"./www/thumb"` ThumbnailPathURL string `json:"thumbnail_path_url" default:"/thumb"` ImagePath string `json:"image_path" default:"./www/files"` // same as upload path? ImagePathURL string `json:"image_url" default:"/files"` // same as url_upload_path }
Click to show internal directories.
Click to hide internal directories.