Permalink
Browse files

fix DecodeJpg

  • Loading branch information...
1 parent c5366e5 commit 62e5b62ac5bbafabdf65cf6f10e8f89d1fb03136 @tobi committed May 29, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 jpg.go
View
8 jpg.go
@@ -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
}

0 comments on commit 62e5b62

Please sign in to comment.