image

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ImageHttpClients = &http.Client{
	Transport: &http.Transport{
		DialContext: utils.Socks5ProxyFunc,
		Proxy:       utils.ProxyFunc,
	},
	Timeout: 15 * time.Second,
}

Functions

func GetImageFromUrl

func GetImageFromUrl(url string) (mimeType string, data string, err error)

func GetImageSize

func GetImageSize(image string) (width, height int, err error)

func GetImageSizeFromBase64

func GetImageSizeFromBase64(encoded string) (width, height int, err error)

func GetImageSizeFromUrl

func GetImageSizeFromUrl(url string) (width, height int, err error)

func ParseBase64File

func ParseBase64File(base64Data string) (string, string, error)

func RequestFile

func RequestFile(url, action string) (*http.Response, error)

Types

type CFRequest

type CFRequest struct {
	Action string `json:"action"`
	APIKey string `json:"api_key"`
	URL    string `json:"url"`
}

type CFResponse

type CFResponse struct {
	Status   bool   `json:"status"`
	Message  string `json:"message,omitempty"`
	Data     string `json:"data,omitempty"`
	MimeType string `json:"mimeType,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL