MCPcopy Create free account
hub / github.com/lxn/walk / NewImageFromFileForDPI

Function NewImageFromFileForDPI

image.go:62–70  ·  view source on GitHub ↗

NewImageFromFileForDPI loads image from file at given DPI. Supported types are .ico, .emf, .bmp, .png...

(filePath string, dpi int)

Source from the content-addressed store, hash-verified

60// NewImageFromFileForDPI loads image from file at given DPI. Supported types are .ico, .emf,
61// .bmp, .png...
62func NewImageFromFileForDPI(filePath string, dpi int) (Image, error) {
63 if strings.HasSuffix(filePath, ".ico") {
64 return NewIconFromFile(filePath)
65 } else if strings.HasSuffix(filePath, ".emf") {
66 return NewMetafileFromFile(filePath)
67 }
68
69 return NewBitmapFromFileForDPI(filePath, dpi)
70}
71
72type PaintFuncImage struct {
73 size96dpi Size

Callers 1

NewImageFromFileFunction · 0.85

Calls 3

NewIconFromFileFunction · 0.85
NewMetafileFromFileFunction · 0.85
NewBitmapFromFileForDPIFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…