NewImageFromFileForDPI loads image from file at given DPI. Supported types are .ico, .emf, .bmp, .png...
(filePath string, dpi int)
| 60 | // NewImageFromFileForDPI loads image from file at given DPI. Supported types are .ico, .emf, |
| 61 | // .bmp, .png... |
| 62 | func 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 | |
| 72 | type PaintFuncImage struct { |
| 73 | size96dpi Size |
no test coverage detected
searching dependent graphs…