MCPcopy Create free account
hub / github.com/aurora-develop/aurora / imageEditReadJSONImage

Function imageEditReadJSONImage

initialize/handlers.go:969–980  ·  view source on GitHub ↗
(data []byte, filename, contentType string)

Source from the content-addressed store, hash-verified

967}
968
969func imageEditReadJSONImage(data []byte, filename, contentType string) (editImageInput, error) {
970 if len(data) == 0 {
971 return editImageInput{}, fmt.Errorf("image data is empty")
972 }
973 if filename == "" {
974 filename = "image.png"
975 }
976 if contentType == "" {
977 contentType = "image/png"
978 }
979 return editImageInput{Data: data, Filename: filename, ContentType: contentType}, nil
980}
981
982// imageEditDecodeDataURL 解析 data:image/...;base64,XXXX 形式的 URL。
983func imageEditDecodeDataURL(url string) (editImageInput, error) {

Callers 4

imageEditDecodeDataURLFunction · 0.85
imageEditDownloadHTTPURLFunction · 0.85
imageEditConvertURLFunction · 0.85
resolveEditImageSourcesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected