Skip to content

Commit

Permalink
fix DecodeJpg
Browse files Browse the repository at this point in the history
  • Loading branch information
tobi committed May 29, 2012
1 parent c5366e5 commit 62e5b62
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion jpg.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ type Jpg struct {

func DecodeJpg(reader io.Reader) Image {
var image Jpg
if _, err := readFromJpg(reader); err != nil {

gd, err := readFromJpg(reader);

if err == nil {
return nil
}

image.gd = gd

return &image
}

Expand Down

0 comments on commit 62e5b62

Please sign in to comment.