Skip to content
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

DataExtension: add Google Storage JPEG head bytes #23

Merged
merged 1 commit into from
Apr 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
DataExtension: add Google Storage JPEG head bytes
  • Loading branch information
MihaelIsaev authored Apr 6, 2022
commit e81ce9c487bebb24fda033a41f2ebe7b3a047352
6 changes: 6 additions & 0 deletions Sources/ImageCode/DataExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ public extension LonginusExtension where Base == Data {
{
return .JPEG

} else if buffer[0] == 0x52, // Google Storage JPEG
buffer[1] == 0x49,
buffer[2] == 0x46
{
return .JPEG

} else if buffer[0] == ImageFormat.HeaderData.GIF[0],
buffer[1] == ImageFormat.HeaderData.GIF[1],
buffer[2] == ImageFormat.HeaderData.GIF[2]
Expand Down