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
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
12 deletions
+16
-12
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
No files found.
img_bg/pierremarqueNO-BG.png
0 → 100644
View file @
4840a99b
152 KB
index.php
View file @
4840a99b
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
previewImage
.
setAttribute
(
"src"
,
this
.
result
);
previewImage
.
setAttribute
(
"src"
,
this
.
result
);
});
});
reader
.
readAsDataURL
(
file
);
reader
.
readAsDataURL
(
file
);
findFaces
(
"img-ID"
);
//
findFaces("img-ID");
}
}
inpFile
.
addEventListener
(
"change"
,
function
(){
inpFile
.
addEventListener
(
"change"
,
function
(){
const
file
=
inpFile
.
files
[
0
];
const
file
=
inpFile
.
files
[
0
];
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
previewImage
.
setAttribute
(
"src"
,
this
.
result
);
previewImage
.
setAttribute
(
"src"
,
this
.
result
);
});
});
reader
.
readAsDataURL
(
file
);
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
<?php
// phpinfo();
// phpinfo();
// echo json_encode(array("test"=>"ok")); die;
define
(
'WHERE_TO_PUT'
,
'img_bg'
);
define
(
'WHERE_TO_PUT'
,
'img_bg'
);
define
(
'PATH_TO_BG'
,
"img_bg"
);
define
(
'PATH_TO_BG'
,
"img_bg"
);
define
(
'TEMP'
,
'temp'
);
define
(
'TEMP'
,
'temp'
);
...
...
script.js
View file @
4840a99b
...
@@ -37,9 +37,12 @@ var format_correct = false;
...
@@ -37,9 +37,12 @@ var format_correct = false;
// SCRIPT ====================================================================================
// SCRIPT ====================================================================================
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
inputFileUpload
=
$
(
"#"
+
idFileUpload
);
// console.log(inputFileUpload.val());
// console.log(inputFileUpload.val());
console
.
log
(
getParameter
(
window
.
location
.
href
));
console
.
log
(
getParameter
(
window
.
location
.
href
));
//Variables des éléments du DOM.
inputFileUpload
=
$
(
"#"
+
idFileUpload
);
btnCustomFileUpload
=
$
(
"#"
+
idCustomFileUpload
);
btnCustomFileUpload
=
$
(
"#"
+
idCustomFileUpload
);
Img
=
$
(
"#"
+
ID
);
Img
=
$
(
"#"
+
ID
);
ImgBG
=
$
(
"#"
+
ID_bg
);
ImgBG
=
$
(
"#"
+
ID_bg
);
...
@@ -48,7 +51,7 @@ $(document).ready(function(){
...
@@ -48,7 +51,7 @@ $(document).ready(function(){
Console
=
$
(
"#"
+
idConsole
);
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
});
inputFileUpload
.
change
(
function
(){
unSeulVisage
=
false
;
format_correct
=
false
});
//Requête pour les vérifications de sécurité & de format
//Requête pour les vérifications de sécurité & de format
$
(
"#form"
).
on
(
"submit"
,
function
(
event
)
{
$
(
"#form"
).
on
(
"submit"
,
function
(
event
)
{
...
@@ -153,13 +156,13 @@ $(document).ready(function(){
...
@@ -153,13 +156,13 @@ $(document).ready(function(){
})
})
//Lorsque l'utilisateur souhaite changer d'image
//Lorsque l'utilisateur souhaite changer d'image
btnCancel
.
on
(
'click'
,
function
(){
//
btnCancel.on('click', function(){
unSeulVisage
=
false
;
//
unSeulVisage = false;
format_correct
=
false
;
//
format_correct = false;
ImgBG
.
attr
(
'src'
,
""
);
//
ImgBG.attr('src',"");
Img
.
attr
(
'src'
,
""
);
//
Img.attr('src',"");
$
(
"#li-oneface"
).
css
(
'color'
,
'black'
);
//
$("#li-oneface").css('color','black');
});
//
});
...
...
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