Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadImageTool ¶ added in v0.3.0
Types ¶
type ReadImageArgs ¶ added in v0.3.0
type ReadImageOut ¶ added in v0.3.0
type ReadImageOut struct {
Path string `json:"path"`
Name string `json:"name"`
Exists bool `json:"exists"`
SizeBytes int64 `json:"sizeBytes,omitempty"`
ModTime *time.Time `json:"modTime,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
Format string `json:"format,omitempty"` // "png", "jpeg", ...
MIMEType string `json:"mimeType,omitempty"` // "image/png", ...
// Optional content.
Base64Data string `json:"base64Data,omitempty"`
}
func ReadImage ¶ added in v0.3.0
func ReadImage(ctx context.Context, args ReadImageArgs) (*ReadImageOut, error)
ReadImage reads intrinsic metadata for a local image file, optionally including base64-encoded contents. Semantics:
- empty path => error
- directory path => error
- non-image/unsupported image => error
- non-existent path => (Exists=false, err=nil).
Click to show internal directories.
Click to hide internal directories.