Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Projet ISIS
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
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MARQUE Pierre
Projet ISIS
Commits
4840a99b
Commit
4840a99b
authored
Mar 29, 2022
by
Okthane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
maj
parent
ccc05d15
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
13 deletions
+17
-13
pierremarqueNO-BG.png
img_bg/pierremarqueNO-BG.png
+0
-0
index.php
index.php
+2
-2
no-bg.png
no-bg.png
+1
-0
removeBackground2.php
removeBackground2.php
+1
-1
script.js
script.js
+12
-9
upload.php
upload.php
+1
-1
No files found.
img_bg/pierremarqueNO-BG.png
0 → 100644
View file @
4840a99b
152 KB
index.php
View file @
4840a99b
...
...
@@ -64,7 +64,7 @@
previewImage
.
setAttribute
(
"src"
,
this
.
result
);
});
reader
.
readAsDataURL
(
file
);
findFaces
(
"img-ID"
);
//
findFaces("img-ID");
}
inpFile
.
addEventListener
(
"change"
,
function
(){
const
file
=
inpFile
.
files
[
0
];
...
...
@@ -76,7 +76,7 @@
previewImage
.
setAttribute
(
"src"
,
this
.
result
);
});
reader
.
readAsDataURL
(
file
);
findFaces
(
"img-ID"
);
//
findFaces("img-ID");
}
});
...
...
no-bg.png
0 → 100644
View file @
4840a99b
{"errors":[{"title":"No image given","code":"missing_source","detail":"Please provide the source image in the image_url, image_file or image_file_b64 parameter."}]}
\ No newline at end of file
removeBackground2.php
View file @
4840a99b
<?php
// phpinfo();
// echo json_encode(array("test"=>"ok")); die;
define
(
'WHERE_TO_PUT'
,
'img_bg'
);
define
(
'PATH_TO_BG'
,
"img_bg"
);
define
(
'TEMP'
,
'temp'
);
...
...
script.js
View file @
4840a99b
...
...
@@ -37,9 +37,12 @@ var format_correct = false;
// SCRIPT ====================================================================================
$
(
document
).
ready
(
function
(){
inputFileUpload
=
$
(
"#"
+
idFileUpload
);
// console.log(inputFileUpload.val());
console
.
log
(
getParameter
(
window
.
location
.
href
));
//Variables des éléments du DOM.
inputFileUpload
=
$
(
"#"
+
idFileUpload
);
btnCustomFileUpload
=
$
(
"#"
+
idCustomFileUpload
);
Img
=
$
(
"#"
+
ID
);
ImgBG
=
$
(
"#"
+
ID_bg
);
...
...
@@ -48,7 +51,7 @@ $(document).ready(function(){
Console
=
$
(
"#"
+
idConsole
);
//
empêcher de valider si la photo n'est pas valide
//
Si l'on change la photo,
inputFileUpload
.
change
(
function
(){
unSeulVisage
=
false
;
format_correct
=
false
});
//Requête pour les vérifications de sécurité & de format
$
(
"#form"
).
on
(
"submit"
,
function
(
event
)
{
...
...
@@ -153,13 +156,13 @@ $(document).ready(function(){
})
//Lorsque l'utilisateur souhaite changer d'image
btnCancel
.
on
(
'click'
,
function
(){
unSeulVisage
=
false
;
format_correct
=
false
;
ImgBG
.
attr
(
'src'
,
""
);
Img
.
attr
(
'src'
,
""
);
$
(
"#li-oneface"
).
css
(
'color'
,
'black'
);
});
//
btnCancel.on('click', function(){
//
unSeulVisage = false;
//
format_correct = false;
//
ImgBG.attr('src',"");
//
Img.attr('src',"");
//
$("#li-oneface").css('color','black');
//
});
...
...
upload.php
View file @
4840a99b
...
...
@@ -74,4 +74,4 @@ if($_SERVER["REQUEST_METHOD"] == "POST")
);
echo
json_encode
(
$data
);
}
?>
\ No newline at end of file
?>
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