Skip to content

Commit

Permalink
assigned errors
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-mescudi committed Jan 4, 2025
1 parent 05790f1 commit 1907d27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions image_embedder.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (m *EmbedHandler) Encode(coverImage image.Image, data []byte, bitDepth uint
// Generate image from embedded RGB channels
imgdata, err := u.SaveImage(embeddedRGBChannels, height, width)
if err != nil {
return fmt.Errorf("failed to create embedded image: %w", err)
return ErrFailedToSaveImage
}

// Use default filename if none provided
Expand Down Expand Up @@ -224,7 +224,7 @@ func (m *SecureEmbedHandler) Encode(coverImage image.Image, data []byte, bitDept
// Generate image from embedded RGB channels
imgdata, err := u.SaveImage(embeddedRGBChannels, height, width)
if err != nil {
return fmt.Errorf("failed to create embedded image: %w", err)
return ErrFailedToSaveImage
}

// Use default filename if none provided
Expand Down

0 comments on commit 1907d27

Please sign in to comment.