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
bc4a5db3
Commit
bc4a5db3
authored
Apr 01, 2019
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added tiff.js
parent
58567ad0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
469 additions
and
6 deletions
+469
-6
index.php
src/index/index.php
+1
-0
Makefile
src/jp4-canvas/Makefile
+1
-0
jp4-canvas.html
src/jp4-canvas/jp4-canvas.html
+1
-0
jp4-canvas.js
src/jp4-canvas/jp4-canvas.js
+4
-4
jquery-jp4.js
src/jp4-canvas/jquery-jp4.js
+28
-2
tiff.js
src/jp4-canvas/tiff.js
+434
-0
No files found.
src/index/index.php
View file @
bc4a5db3
...
...
@@ -57,6 +57,7 @@
<!--<script type='text/javascript' src='../js/bootstrap/js/bootstrap.js'></script>-->
<script
src=
"js/elphel.js"
></script>
<script
src=
"js/jcanvas.js"
></script>
<script
src=
"js/tiff.js"
></script>
<script
src=
"js/exif.js"
></script>
<script
src=
"js/jquery-jp4.js"
></script>
...
...
src/jp4-canvas/Makefile
View file @
bc4a5db3
...
...
@@ -7,6 +7,7 @@ DOCS= jp4-canvas.html \
LIBS
=
elphel.js
\
exif.js
\
tiff.js
\
jquery-jp4.js
\
jcanvas.js
\
webworker.js
...
...
src/jp4-canvas/jp4-canvas.html
View file @
bc4a5db3
...
...
@@ -16,6 +16,7 @@
</tr>
</table>
<script
src=
"js/elphel.js"
></script>
<script
src=
"js/tiff.js"
></script>
<script
src=
"js/jquery-3.1.1.js"
></script>
<script
src=
"js/jcanvas.js"
></script>
<script
src=
"js/exif.js"
></script>
...
...
src/jp4-canvas/jp4-canvas.js
View file @
bc4a5db3
...
...
@@ -27,9 +27,9 @@
$
(
function
(){
var
t1
=
$
(
"#test1"
).
jp4
({
ip
:
"127.0.0.1"
,
port
:
2323
,
width
:
600
,
fast
:
true
,
lowres
:
4
});
var
t2
=
$
(
"#test2"
).
jp4
({
ip
:
"127.0.0.1"
,
port
:
2324
,
width
:
600
,
fast
:
true
,
lowres
:
4
});
var
t3
=
$
(
"#test3"
).
jp4
({
ip
:
"127.0.0.1"
,
port
:
2325
,
width
:
600
,
fast
:
true
,
lowres
:
4
});
var
t4
=
$
(
"#test4"
).
jp4
({
ip
:
"127.0.0.1"
,
port
:
2326
,
width
:
600
,
fast
:
true
,
lowres
:
4
});
var
t1
=
$
(
"#test1"
).
jp4
({
ip
:
location
.
host
,
port
:
2323
,
width
:
600
,
fast
:
true
,
lowres
:
4
});
var
t2
=
$
(
"#test2"
).
jp4
({
ip
:
location
.
host
,
port
:
2324
,
width
:
600
,
fast
:
true
,
lowres
:
4
});
var
t3
=
$
(
"#test3"
).
jp4
({
ip
:
location
.
host
,
port
:
2325
,
width
:
600
,
fast
:
true
,
lowres
:
4
});
var
t4
=
$
(
"#test4"
).
jp4
({
ip
:
location
.
host
,
port
:
2326
,
width
:
600
,
fast
:
true
,
lowres
:
4
});
});
src/jp4-canvas/jquery-jp4.js
View file @
bc4a5db3
...
...
@@ -136,8 +136,16 @@
}
if
(
this
.
status
===
200
)
{
obj
.
blob
=
window
.
URL
.
createObjectURL
(
http
.
response
);
process_image
(
obj
.
blob
);
var
contentType
=
http
.
getResponseHeader
(
"Content-Type"
);
if
(
contentType
==
"image/tiff"
){
process_image_tiff
(
http
.
response
);
}
else
{
obj
.
blob
=
window
.
URL
.
createObjectURL
(
http
.
response
);
process_image
(
obj
.
blob
);
}
delete
this
;
//URL.revokeObjectURL(imgdata);
}
...
...
@@ -181,6 +189,24 @@
return
Array
(
settings
.
ip
,
settings
.
port
);
}
function
process_image_tiff
(
blob
){
var
arrayBuffer
;
var
fileReader
=
new
FileReader
();
fileReader
.
onload
=
function
(
event
){
arrayBuffer
=
event
.
target
.
result
;
var
tiff
=
new
Tiff
({
buffer
:
arrayBuffer
});
var
canvas
=
tiff
.
toCanvas
();
cnv_working
.
trigger
(
"canvas_ready"
);
obj
.
busy
=
false
;
Elphel
.
Canvas
.
drawScaled
(
$
(
canvas
),
cnv_display
,
settings
.
width
);
}
fileReader
.
readAsArrayBuffer
(
blob
);
}
function
process_image
(
imagedata
){
var
canvas
=
cnv_working
;
...
...
src/jp4-canvas/tiff.js
0 → 100644
View file @
bc4a5db3
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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