Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-tools-x393
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-tools-x393
Commits
8d4e360d
Commit
8d4e360d
authored
Feb 13, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor
parent
3b908324
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
14 deletions
+23
-14
extract_images.php
extract_images.php
+23
-14
No files found.
extract_images.php
View file @
8d4e360d
...
...
@@ -136,7 +136,7 @@ function split_file($path,$file,$destination){
global
$input_exts
;
if
(
in_array
(
get_ext
(
"
$path
/
$file
"
),
$input_exts
))
{
echo
"Splitting
$path
/
$file
\n
"
;
echo
"Splitting
$path
/
$file
, results dir:
$path
/
$destination
\n
"
;
//split_mov("$path",$file,$destination,$extension,$startMarkerWithExif,$chunksize);
$markers
=
array
();
...
...
@@ -185,9 +185,11 @@ function split_file($path,$file,$destination){
function
elphel_specific_result_name
(
$file
){
global
$forced_ext
;
$exif
=
exif_read_data
(
$file
);
$ext
=
elphel_specific_result_ext
(
$exif
);
$ext
=
elphel_specific_result_ext
(
$exif
,
$forced_ext
);
//converting GMT a local time GMT+7
$timestamp_local
=
strtotime
(
$exif
[
'DateTimeOriginal'
]);
/*-25200;*/
...
...
@@ -196,8 +198,12 @@ function elphel_specific_result_name($file){
$tmp
=
explode
(
"_"
,
$exif
[
'Model'
]);
if
(
count
(
$tmp
)
==
2
){
if
(
trim
(
$tmp
[
0
])
==
"Eyesis4pi393"
){
$model
=
intval
(
trim
(
$tmp
[
1
]));
$chn
=
intval
(
$exif
[
'PageNumber'
])
+
1
;
if
(
$model
==
1001
)
{
$k
=
$chn
;
}
else
if
(
$model
==
1002
)
{
...
...
@@ -205,6 +211,9 @@ function elphel_specific_result_name($file){
}
else
if
(
$model
==
1003
)
{
$k
=
$chn
+
6
;
}
}
}
else
{
$k
=
intval
(
$exif
[
'PageNumber'
])
+
1
;
}
...
...
@@ -220,21 +229,21 @@ function get_ext($filename) {
/**
* read image format and return extension, elphel elphel_specific
* @param array $exif Array returned from the PHP's built-in exif_read_data function
* @param string $override_ext
* @return string extension - jpeg or jp4
*/
function
elphel_specific_result_ext
(
$exif
){
global
$forced_ext
;
function
elphel_specific_result_ext
(
$exif
,
$override_ext
=
""
){
//default value
$ext
=
"jpeg"
;
if
(
$
forced
_ext
==
""
){
if
(
$
override
_ext
==
""
){
if
(
isset
(
$exif
[
'MakerNote'
][
10
])){
$record
=
(
$exif
[
'MakerNote'
][
10
]
>>
4
)
&
0xf
;
if
(
$record
==
5
)
$ext
=
"jp4"
;
}
}
else
{
$ext
=
$
forced
_ext
;
$ext
=
$
override
_ext
;
}
return
$ext
;
}
...
...
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