-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
113 lines (101 loc) · 4.13 KB
/
index.html
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web OCR</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</head>
<script>
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#imageUploaded')
.attr('src', e.target.result)
// .width(500)
// .height(375);
};
reader.readAsDataURL(input.files[0]);
}
}
</script>
<style>
.uploadedImage {
padding: 20px;
}
.mainBody {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url("https://www.wallpaperup.com/uploads/wallpapers/2012/12/08/24017/94607145c1e2a7a382a882aa5592835a-700.jpg");
}
#row-heading {
background: rgba(0, 0, 0, 0.3);
padding-bottom: 10px;
padding-top: 10px;
}
#HoveringButton:hover {
transform: scale(1.05, 1.05);
}
#HoveringButton1:hover {
transform: scale(1.05, 1.05);
}
</style>
<body class="mainBody">
<!--for the heading-->
<div class="container-fluid">
<div class="row" id="row-heading">
<div class="col">
<h1 class="text-center" style="color:#0027a0"><strong>Text-Recognition</strong></h1>
</div>
</div>
</div>
<div class="container">
<div class="row">
<!--This is the left side.User selects -->
<div class="col d-flex align-items-stretch">
<div class="card uploadedImage" style="background: rgba(255,255,255,0.81)">
<div class="text-center">
<img class="card-img-fluid"
src="https://lh3.googleusercontent.com/_-a1CwhEQWZpCeuHcEX9hF8soNPeBTuyT6lPG4j7CFRvb8UY24Dc6ed96sdf2sBoFZxF=w300"
alt="Card image"
id="imageUploaded"
style="width:100%;
position: center;
align-items: center ">
</div>
<div class="card-body">
<h4 class="card-title text-center"><strong>Upload your picture</strong></h4>
<form id="frmUploader" enctype="multipart/form-data" action="/UploadImage" method="post"
target="fromServer">
<div class="text-center" id="HoveringButton">
<label id="" class="btn btn-primary btn-file btn-block">
Browse the image to convert to text <input type="file" name="imgUploader" multiple
onchange="readURL(this)"
style="display: none;">
</label>
</div>
<div class="text-center" id="HoveringButton1">
<input class="btn-primary btn-block" type="submit" name="submit" id="btnSubmit"
value="Upload"/>
</div>
</form>
</div>
</div>
</div>
<!--This is the right side.-->
<div class="col d-flex align-items-stretch" >
<div class="card uploadedImage" style="background: rgba(255,255,255,0.81)">
<iframe id="frame" name="fromServer" height="500px" width="500px"></iframe>
</div>
</div>
</div>
</div>
</body>
</html>