Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
matrix-media-repo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
matrix-media-repo
Commits
3a44dc46
Commit
3a44dc46
authored
4 years ago
by
Travis Ralston
Browse files
Options
Downloads
Patches
Plain Diff
Handle orientation of zero as no orientation
parent
cd38ee2b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+4
-0
4 additions, 0 deletions
CHANGELOG.md
util/util_exif/exif.go
+5
-0
5 additions, 0 deletions
util/util_exif/exif.go
with
9 additions
and
0 deletions
CHANGELOG.md
+
4
−
0
View file @
3a44dc46
...
...
@@ -12,6 +12,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
*
Added a new tool,
`export_synapse_for_import`
, which can be used to do an offline import from Synapse.
*
After running this tool, use the
`gdpr_import`
tool to bring the export into the media repo.
### Fixed
*
Fixed thumbnails for invalid JPEGs.
## [1.2.0] - August 2nd, 2020
### Upgrade notes
...
...
This diff is collapsed.
Click to expand it.
util/util_exif/exif.go
+
5
−
0
View file @
3a44dc46
...
...
@@ -40,6 +40,11 @@ func GetExifOrientation(img io.ReadCloser) (*ExifOrientation, error) {
return
nil
,
errors
.
New
(
"exif: error parsing orientation: "
+
err
.
Error
())
}
// Some devices produce invalid exif data when they intend to mean "no orientation"
if
orientation
==
0
{
return
nil
,
nil
}
if
orientation
<
1
||
orientation
>
8
{
return
nil
,
errors
.
New
(
fmt
.
Sprintf
(
"orientation out of range: %d"
,
orientation
))
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment