-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various improvements to the updated Go library and example app #64
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, left some comments. I think you also need to rebase to fix this error:
https://travis-ci.org/strukturag/libheif/jobs/418152407
go/heif/heif.go
Outdated
@@ -94,12 +94,12 @@ const ( | |||
ProgressStepLoadTile = C.heif_progress_step_load_tile | |||
) | |||
|
|||
// --- HeifError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to expose the HeifError
so users can cast the returned error
to HeifError
and inspect the actual error.
go/heif/heif.go
Outdated
|
||
type ErrorCode int | ||
type errorCode int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep exported, see above.
go/heif/heif.go
Outdated
) | ||
|
||
type ErrorSubcode int | ||
type errorSubcode int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep exported, see above.
go/heif/heif.go
Outdated
type HeifError struct { | ||
Code ErrorCode | ||
Subcode ErrorSubcode | ||
type heifError struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep exported, see above.
go/heif/heif.go
Outdated
@@ -694,6 +690,7 @@ func decodeConfig(r io.Reader) (image.Config, error) { | |||
} | |||
|
|||
func init() { | |||
image.RegisterFormat("heif", "\x00\x00\x00\x18\x66\x74\x79\x70", decodeImage, decodeConfig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move below the other RegisterFormat
and update the comment.
Rebased to master & addressed your comments. PTAL @fancycode |
if err.Code == ErrorUnsupportedFiletype { | ||
fmt.Println("XXX") | ||
} | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return err
should remain (see Travis errors).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oopsie, fixed.
772654d
to
1d3b94d
Compare
ID
, etc.)