Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-mescudi committed Dec 11, 2024
1 parent e35d969 commit 95e83f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion image_core.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (m *embedHandler) EmbedDataIntoImage(coverImage image.Image, data []byte, b
}

RGBchannels := u.ExtractRGBChannelsFromImageWithConCurrency(coverImage, m.concurrency)
if (len(data)*8)+32 > (len(RGBchannels) * 3 * (int(bitDepth) + 1)) / 8 {
if (len(data)*8)+32 > len(RGBchannels)*3*(int(bitDepth)+1) {
return nil, fmt.Errorf("error: Data too large to embed into the image")
}

Expand Down

0 comments on commit 95e83f4

Please sign in to comment.