Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imageProcessing
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
Ecole
imageProcessing
Commits
ceb25754
Commit
ceb25754
authored
Apr 10, 2018
by
BORNON Théophile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stegano
parent
24ab992d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
2 deletions
+36
-2
Display.cs
S04_Projet/Display.cs
+4
-0
MyImage.cs
S04_Projet/MyImage.cs
+27
-0
Program.cs
S04_Projet/Program.cs
+5
-2
No files found.
S04_Projet/Display.cs
View file @
ceb25754
...
@@ -114,6 +114,8 @@ namespace S04_Projet
...
@@ -114,6 +114,8 @@ namespace S04_Projet
return
(
Operation
)
choosenItem
;
return
(
Operation
)
choosenItem
;
}
}
#
region
Operations
public
static
MyImage
PerformOperation
(
Operation
ope
,
MyImage
img
)
public
static
MyImage
PerformOperation
(
Operation
ope
,
MyImage
img
)
{
{
MyImage
output
=
null
;
MyImage
output
=
null
;
...
@@ -344,6 +346,8 @@ namespace S04_Projet
...
@@ -344,6 +346,8 @@ namespace S04_Projet
return
null
;
return
null
;
}
}
#
endregion
public
unsafe
static
MyImage
CreateImageOperation
()
public
unsafe
static
MyImage
CreateImageOperation
()
{
{
Options
opt
=
new
Options
Options
opt
=
new
Options
...
...
S04_Projet/MyImage.cs
View file @
ceb25754
...
@@ -652,6 +652,33 @@ namespace S04_Projet
...
@@ -652,6 +652,33 @@ namespace S04_Projet
return
new
MyImage
(
opt
,
newRPixel
,
newGPixel
,
newBPixel
);
return
new
MyImage
(
opt
,
newRPixel
,
newGPixel
,
newBPixel
);
}
}
public
unsafe
MyImage
Steganography
(
string
sentence
)
{
Options
options
=
opt
.
Copy
();
int
size
=
opt
.
height
*
opt
.
width
;
byte
_temp
;
byte
[]
newRPixel
=
new
byte
[
size
];
byte
[]
newGPixel
=
new
byte
[
size
];
byte
[]
newBPixel
=
new
byte
[
size
];
fixed
(
byte
*
newRPixePtr
=
newRPixel
,
newGPixePtr
=
newGPixel
,
newBPixePtr
=
newBPixel
)
{
fixed
(
byte
*
rPtr
=
rPixels
,
gPtr
=
gPixels
,
bPtr
=
bPixels
)
{
for
(
int
i
=
0
;
i
<
sentence
.
Length
;
i
++)
{
_temp
=
(
byte
)
sentence
[
i
];
for
(
int
j
=
0
;
j
<
8
;
j
++)
{
}
Console
.
Write
(
" "
);
}
}
}
return
null
;
}
private
byte
ToByte
(
int
i
)
private
byte
ToByte
(
int
i
)
{
{
if
(
i
>
255
)
return
255
;
if
(
i
>
255
)
return
255
;
...
...
S04_Projet/Program.cs
View file @
ceb25754
...
@@ -6,7 +6,6 @@ namespace S04_Projet
...
@@ -6,7 +6,6 @@ namespace S04_Projet
{
{
class
Program
class
Program
{
{
//public static bool MULTITHREADING_LOAD = false;
public
static
bool
MULTITHREADING
=
false
;
public
static
bool
MULTITHREADING
=
false
;
public
static
int
MAX_THREADS
=
Environment
.
ProcessorCount
;
public
static
int
MAX_THREADS
=
Environment
.
ProcessorCount
;
public
static
bool
DEBUG
=
false
;
public
static
bool
DEBUG
=
false
;
...
@@ -20,6 +19,10 @@ namespace S04_Projet
...
@@ -20,6 +19,10 @@ namespace S04_Projet
static
void
Main
(
string
[]
args
)
static
void
Main
(
string
[]
args
)
{
{
MyImage
img
=
new
MyImage
(
"img/coco.bmp"
);
img
.
Steganography
(
"message"
);
Console
.
Read
();
/*
#region Arguments
#region Arguments
if (args.Length > 0)
if (args.Length > 0)
{
{
...
@@ -62,7 +65,7 @@ namespace S04_Projet
...
@@ -62,7 +65,7 @@ namespace S04_Projet
Console.WriteLine("Image sauvegardée en {0}ms!", Display.elapsedTime);
Console.WriteLine("Image sauvegardée en {0}ms!", Display.elapsedTime);
Console.Read();
Console.Read();
}
}
#
endregion
#endregion
*/
}
}
private
static
void
Arguments
(
string
[]
args
,
int
i
)
private
static
void
Arguments
(
string
[]
args
,
int
i
)
...
...
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