Skip to content

Commit

Permalink
Merge pull request #35 from ntodd/patch-1
Browse files Browse the repository at this point in the history
Fix dialyzer spec and documentation for Image.exif/1
  • Loading branch information
kipcole9 authored Jan 28, 2023
2 parents ec3b08a + 7544332 commit 2bd0c29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/image.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2367,8 +2367,10 @@ defmodule Image do
* `{:ok, exif_map}` where `exif_map` is a map
of selected EXIF data.
* `{:error, reason}`
"""
@spec exif(Vimage.t()) :: {:ok, map()}
@spec exif(Vimage.t()) :: {:ok, map()} | {:error, error_message()}
def exif(%Vimage{} = image) do
with {:ok, exif_blob} <- Vimage.header_value(image, "exif-data"),
<<"Exif"::binary, 0::16, exif::binary>> <- exif_blob do
Expand Down

0 comments on commit 2bd0c29

Please sign in to comment.