FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Distributed/imagetest.cpp at master · osamahammad21/Distributed · GitHub
osamahammad21
/
Distributed
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
3
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Distributed
/
imagetest.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
59 lines (57 loc) · 1.79 KB
Breadcrumbs
Distributed
/
imagetest.cpp
Copy path
File metadata and controls
59 lines (57 loc) · 1.79 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
include
"
Image.h
"
#
include
<
iostream
>
using
namespace
std
;
int
test =
2
;
int
main
()
{
Image image;
struct
userProperty
prop;
switch
(test)
{
case
0
:
image.
setownerUsername
(
"
osos
"
);
image.
setImageId
(
"
image123
"
);
image.
chooseImage
(
string
(
IMAGE_DIR
)+
"
small.jpg
"
);
for
(
int
i =
0
;i<image.
properties
.
size
();i++)
{
cout<<image.
properties
[i].
user_name
<<
"
"
<<image.
properties
[i].
views
;
if
(i<image.
properties
.
size
()-
1
)
cout<<endl;
}
prop.
user_name
=
"
osama
"
;
prop.
views
=
5
;
image.
properties
.
push_back
(prop);
image.
writeProperties
();
image.
steg
();
image.
removeMiddleFiles
();
break
;
case
1
:
if
(!image.
findImage
(
"
osos
"
,
"
image123
"
))
return
0
;
image.
readProperties
();
for
(
int
i =
0
;i<image.
properties
.
size
();i++)
{
if
(image.
properties
[i].
user_name
==
"
osama
"
&&image.
properties
[i].
views
>
0
)
{
image.
properties
[i].
views
--;
cout<<image.
properties
[i].
views
;
}
}
image.
updateProperties
();
cout<<endl;
cout<<image.
getAuthorizedImagePath
()<<
"
"
<<image.
getUnAuthorizedImagePath
();
break
;
default
:
if
(!image.
findImage
(
"
osos
"
,
"
image123
"
))
return
0
;
image.
desteg
();
cout<<image.
getSmallScaleImage
();
break
;
}
//
image.chooseImage(string(IMAGE_DIR)+"small.jpg");
//
string img = image.extractImage();
//
ofstream out;
//
out.open("trial.jpg",ios_base::out | ios_base::binary);
//
out<<img;
//
out.close();
}
Back
|
FazBrowse Home
|
New Git URL