{
test: /\.html$/,
use: {
loader: 'file-loader'
}
},
<html><head></head><body>e037fc80d820729224f6487d0d192b31.html</body></html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Examples</title>
<script src="bundle.js"></script>
<link rel="import" href="<%= require('../partials/head.html') %>">
</head>
<body>
<link rel="import" href="<%= require('../partials/header.html') %>">
<h1>main</h1>
<link rel="import" href="<%= require('../partials/footer.html') %>">
</body>
</html>
У результаті (виконання роботи) перетворення BMP файлу у txt файл (у двійковий формат).
Текстовий файл повинен містити нулі і одинички (візуально видимі при відкритті у блокноті) по 8 у рядок, що відповідають RGB значенням кожного піксела матриці А:
10101010 01010101 00001111
11
B G R a
10100011 01010001 01101111
12
Тут mn a – значення піксела m-го стовпця в n-му рядку.
111111111101100011111111111000000000000000010000010010100100011001001001010001100000000000000001000000010000000100000000011001000000000001100100000000000000000011111111110110110000000001000011000000000000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000001000000001000000010000000100000001000000010000001000000001000000010000000100000010000000100000001000000010000000100000001000000010000000100000001000000011000000110000010000000011000000110000001100000011000000110000001000000010000000110000010000000011000000110000010000000100000001000000010000000100000000100000001100000101000001010000010000000100000001010000010000000100000001000000010011111111110110110000000001000011000000010000000100000001000000010000000100000001000000010000001000000001000000010000001000000100000000110000001000000011000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010011111111110000000000000000010001000010000000000111110100000000011111000100000011000000010001000100000000000000100001000100000001000000110001000100000001111111111100010000000000000111110000000000000000000000000000011000000011000000010000000100000001000000000000000000000000000000000000000000000000000000000000000000000000000001010000011000000111000010000000100100001010000000000000001100000100000000100000000100001011111111111100010000000000010110100001000000000000000000010000001100000011000000110000001000000100000000110000011000000010000001100000010100000110000011000000000000001111000000010000001000000011000001000000010100000110000100010000000000000111000100100000100000100001000100110010001000110001010000010000100100010100010100010001010100100011001100100110000101110001100000010100001010010001000010100001011000100100001100110101001010100001000101110110001010110001110000011101000101000011010100110101010101110010100000101111000000011000001001010011010001010100010101100110001110010010100100111001010010010101100101101101001001000100110100111110000111110001000110010010011000110101101000101101010011100011011101001000001110100011101100101110010011111111110001000000000000011110000000010000000000000000000001100000001100000001000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000010000000101000001100000011100000001000000100000100000001001000010101111111111000100000000000101010000010001000000000000000100000011000000100000010000000011000001010000010000001000000001000000010000000011000001100000001100000100000010110000000100000010000000110001000100000000000001000000010100010010001000010011000100000110010000010101000100000111000100110010001001100001011100010011
try
{
bool? result = OpenFileDialog.ShowDialog();
if (result.HasValue && result.Value)
{
pictureBox.Source = new Uri(OpenFileDialog.FileName);
}
byte[] byteImageCode = File.ReadAllBytes(OpenFileDialog.FileName);
try
{
using (var fs = new FileStream(@"C:\Users\ukran\Desktop\test.txt", FileMode.Create, FileAccess.Write))
{
fs.Write(byteImageCode, 0, byteImageCode.Length);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
catch (Exception m) {
MessageBox.Show(m.Message);
}
class Example
{
public string name;
delegate string mainFunc();
public Example(string name, Delegate callback)
{
this.name = name;
mainFunc del = new mainFunc(callback);
}
public string init()
{
return this.mainFunc.Invoke();
}
}
...
this.example = new Example("example 1", some_method);
example.init();