Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-web-393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-web-393
Commits
cd6f78cf
Commit
cd6f78cf
authored
Mar 21, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addressed different bayer shifts
parent
7c365579
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
jquery-jp4.js
src/jp4-canvas/jquery-jp4.js
+15
-0
No files found.
src/jp4-canvas/jquery-jp4.js
View file @
cd6f78cf
...
@@ -388,6 +388,20 @@
...
@@ -388,6 +388,20 @@
var
MakerNote
=
EXIF
.
getTag
(
src
,
"MakerNote"
);
var
MakerNote
=
EXIF
.
getTag
(
src
,
"MakerNote"
);
//BAYER_MODE
bayer_mode
=
0
;
// r gr / gb b
if
(
typeof
MakerNote
!==
'undefined'
){
bayer_mode
=
(
MakerNote
[
10
]
>>
2
)
&
0x3
;
console
.
log
(
"Bayer mode = "
+
bayer_mode
);
switch
(
bayer_mode
){
case
0
:
BAYER
=
[[
"Gr"
,
"R"
],[
"B"
,
"Gb"
]];
break
;
case
1
:
BAYER
=
[[
"R"
,
"Gr"
],[
"Gb"
,
"B"
]];
break
;
case
2
:
BAYER
=
[[
"B"
,
"Gb"
],[
"Gr"
,
"R"
]];
break
;
case
3
:
BAYER
=
[[
"Gb"
,
"B"
],[
"R"
,
"Gr"
]];
break
;
default
:
BAYER
=
[[
"Gr"
,
"R"
],[
"B"
,
"Gb"
]];
}
}
//FLIPH & FLIPV
//FLIPH & FLIPV
if
(
typeof
MakerNote
!==
'undefined'
){
if
(
typeof
MakerNote
!==
'undefined'
){
FLIPH
=
(
MakerNote
[
10
]
)
&
0x1
;
FLIPH
=
(
MakerNote
[
10
]
)
&
0x1
;
...
@@ -405,6 +419,7 @@
...
@@ -405,6 +419,7 @@
}
}
}
}
settings
.
mosaic
=
BAYER
;
//console.log("MakerNote: Flips: V:"+FLIPV+" H:"+FLIPH);
//console.log("MakerNote: Flips: V:"+FLIPV+" H:"+FLIPH);
//COLOR_MODE ----------------------------------------------------------------
//COLOR_MODE ----------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment