# LoadFromFile

Load an image from an instance of `*os.File` . It is recommended to use the [Load](load) method to load an image.

## Parameters

<table><thead><tr><th width="198.4826833846656">Parameter</th><th width="208.18338610093963">Type</th><th>Description</th></tr></thead><tbody><tr><td>file</td><td><code>*os.File</code></td><td>The instance of <code>*os.File</code> .</td></tr></tbody></table>

## Return Values

The instance of `*imgo.Image` .

## Examples

```go
package main

import (
    "github.com/fishtailstudio/imgo"
    "os"
)

func main() {
    file, err := os.Open("gopher.png")
    if err != nil {
        panic(err)
    }
    defer file.Close()

    imgo.LoadFromFile(file).
        Save("out.png")
}
```
