├── App.config ├── MainForm.Designer.cs ├── MainForm.cs ├── MainForm.resx ├── PictureFetcher.csproj ├── PictureFetcher.sln ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── README.md └── ldr_01.ico /App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /MainForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PictureReader 2 | { 3 | partial class MainForm 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 false。 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要修改 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); 32 | this.btn_mult_convert = new System.Windows.Forms.Button(); 33 | this.label_src_pic_name = new System.Windows.Forms.Label(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.pb_src = new System.Windows.Forms.PictureBox(); 36 | this.pb_to = new System.Windows.Forms.PictureBox(); 37 | this.tb_yuzhi = new System.Windows.Forms.Label(); 38 | this.nud_yuzhi = new System.Windows.Forms.NumericUpDown(); 39 | this.btn_save = new System.Windows.Forms.Button(); 40 | this.tb_data = new System.Windows.Forms.TextBox(); 41 | this.label3 = new System.Windows.Forms.Label(); 42 | this.cb_ascii = new System.Windows.Forms.CheckBox(); 43 | this.cb_text = new System.Windows.Forms.CheckBox(); 44 | this.cb_reverse = new System.Windows.Forms.CheckBox(); 45 | this.btn_single_convert = new System.Windows.Forms.Button(); 46 | this.track_bar_ocap = new System.Windows.Forms.TrackBar(); 47 | this.label1 = new System.Windows.Forms.Label(); 48 | this.ll_open_source_address = new System.Windows.Forms.LinkLabel(); 49 | ((System.ComponentModel.ISupportInitialize)(this.pb_src)).BeginInit(); 50 | ((System.ComponentModel.ISupportInitialize)(this.pb_to)).BeginInit(); 51 | ((System.ComponentModel.ISupportInitialize)(this.nud_yuzhi)).BeginInit(); 52 | ((System.ComponentModel.ISupportInitialize)(this.track_bar_ocap)).BeginInit(); 53 | this.SuspendLayout(); 54 | // 55 | // btn_mult_convert 56 | // 57 | resources.ApplyResources(this.btn_mult_convert, "btn_mult_convert"); 58 | this.btn_mult_convert.Name = "btn_mult_convert"; 59 | this.btn_mult_convert.UseVisualStyleBackColor = true; 60 | this.btn_mult_convert.Click += new System.EventHandler(this.Btn_mult_convert_Click); 61 | // 62 | // label_src_pic_name 63 | // 64 | resources.ApplyResources(this.label_src_pic_name, "label_src_pic_name"); 65 | this.label_src_pic_name.Name = "label_src_pic_name"; 66 | // 67 | // label2 68 | // 69 | resources.ApplyResources(this.label2, "label2"); 70 | this.label2.Name = "label2"; 71 | // 72 | // pb_src 73 | // 74 | this.pb_src.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); 75 | this.pb_src.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 76 | resources.ApplyResources(this.pb_src, "pb_src"); 77 | this.pb_src.Name = "pb_src"; 78 | this.pb_src.TabStop = false; 79 | // 80 | // pb_to 81 | // 82 | this.pb_to.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); 83 | this.pb_to.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 84 | resources.ApplyResources(this.pb_to, "pb_to"); 85 | this.pb_to.Name = "pb_to"; 86 | this.pb_to.TabStop = false; 87 | // 88 | // tb_yuzhi 89 | // 90 | resources.ApplyResources(this.tb_yuzhi, "tb_yuzhi"); 91 | this.tb_yuzhi.Name = "tb_yuzhi"; 92 | // 93 | // nud_yuzhi 94 | // 95 | this.nud_yuzhi.Increment = new decimal(new int[] { 96 | 3, 97 | 0, 98 | 0, 99 | 0}); 100 | resources.ApplyResources(this.nud_yuzhi, "nud_yuzhi"); 101 | this.nud_yuzhi.Maximum = new decimal(new int[] { 102 | 765, 103 | 0, 104 | 0, 105 | 0}); 106 | this.nud_yuzhi.Name = "nud_yuzhi"; 107 | this.nud_yuzhi.Value = new decimal(new int[] { 108 | 300, 109 | 0, 110 | 0, 111 | 0}); 112 | this.nud_yuzhi.ValueChanged += new System.EventHandler(this.nud_test); 113 | // 114 | // btn_save 115 | // 116 | resources.ApplyResources(this.btn_save, "btn_save"); 117 | this.btn_save.Name = "btn_save"; 118 | this.btn_save.UseVisualStyleBackColor = true; 119 | this.btn_save.Click += new System.EventHandler(this.Btn_save_Click); 120 | // 121 | // tb_data 122 | // 123 | this.tb_data.BackColor = System.Drawing.SystemColors.Window; 124 | this.tb_data.ForeColor = System.Drawing.SystemColors.WindowFrame; 125 | resources.ApplyResources(this.tb_data, "tb_data"); 126 | this.tb_data.Name = "tb_data"; 127 | // 128 | // label3 129 | // 130 | resources.ApplyResources(this.label3, "label3"); 131 | this.label3.Name = "label3"; 132 | // 133 | // cb_ascii 134 | // 135 | resources.ApplyResources(this.cb_ascii, "cb_ascii"); 136 | this.cb_ascii.Checked = true; 137 | this.cb_ascii.CheckState = System.Windows.Forms.CheckState.Checked; 138 | this.cb_ascii.Name = "cb_ascii"; 139 | this.cb_ascii.UseVisualStyleBackColor = true; 140 | this.cb_ascii.CheckedChanged += new System.EventHandler(this.Cb_ascii_CheckedChanged); 141 | // 142 | // cb_text 143 | // 144 | resources.ApplyResources(this.cb_text, "cb_text"); 145 | this.cb_text.Name = "cb_text"; 146 | this.cb_text.UseVisualStyleBackColor = true; 147 | this.cb_text.CheckedChanged += new System.EventHandler(this.Cb_text_CheckedChanged); 148 | // 149 | // cb_reverse 150 | // 151 | resources.ApplyResources(this.cb_reverse, "cb_reverse"); 152 | this.cb_reverse.Name = "cb_reverse"; 153 | this.cb_reverse.UseVisualStyleBackColor = true; 154 | this.cb_reverse.CheckedChanged += new System.EventHandler(this.Cb_reverse_CheckedChanged); 155 | // 156 | // btn_single_convert 157 | // 158 | resources.ApplyResources(this.btn_single_convert, "btn_single_convert"); 159 | this.btn_single_convert.Name = "btn_single_convert"; 160 | this.btn_single_convert.UseVisualStyleBackColor = true; 161 | this.btn_single_convert.Click += new System.EventHandler(this.Btn_single_convert_Click); 162 | // 163 | // track_bar_ocap 164 | // 165 | resources.ApplyResources(this.track_bar_ocap, "track_bar_ocap"); 166 | this.track_bar_ocap.Maximum = 100; 167 | this.track_bar_ocap.Name = "track_bar_ocap"; 168 | this.track_bar_ocap.Value = 100; 169 | this.track_bar_ocap.ValueChanged += new System.EventHandler(this.Track_bar_ocap_ValueChanged); 170 | // 171 | // label1 172 | // 173 | resources.ApplyResources(this.label1, "label1"); 174 | this.label1.Name = "label1"; 175 | // 176 | // ll_open_source_address 177 | // 178 | resources.ApplyResources(this.ll_open_source_address, "ll_open_source_address"); 179 | this.ll_open_source_address.LinkColor = System.Drawing.Color.Red; 180 | this.ll_open_source_address.Name = "ll_open_source_address"; 181 | this.ll_open_source_address.TabStop = true; 182 | this.ll_open_source_address.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.Ll_open_source_address_Clicked); 183 | // 184 | // MainForm 185 | // 186 | this.AllowDrop = true; 187 | resources.ApplyResources(this, "$this"); 188 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 189 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); 190 | this.Controls.Add(this.ll_open_source_address); 191 | this.Controls.Add(this.label1); 192 | this.Controls.Add(this.track_bar_ocap); 193 | this.Controls.Add(this.btn_single_convert); 194 | this.Controls.Add(this.cb_reverse); 195 | this.Controls.Add(this.cb_text); 196 | this.Controls.Add(this.cb_ascii); 197 | this.Controls.Add(this.label3); 198 | this.Controls.Add(this.tb_data); 199 | this.Controls.Add(this.btn_save); 200 | this.Controls.Add(this.nud_yuzhi); 201 | this.Controls.Add(this.tb_yuzhi); 202 | this.Controls.Add(this.pb_to); 203 | this.Controls.Add(this.pb_src); 204 | this.Controls.Add(this.label2); 205 | this.Controls.Add(this.label_src_pic_name); 206 | this.Controls.Add(this.btn_mult_convert); 207 | this.Cursor = System.Windows.Forms.Cursors.Default; 208 | this.ForeColor = System.Drawing.SystemColors.ControlText; 209 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; 210 | this.HelpButton = true; 211 | this.Name = "MainForm"; 212 | this.TransparencyKey = System.Drawing.SystemColors.Control; 213 | ((System.ComponentModel.ISupportInitialize)(this.pb_src)).EndInit(); 214 | ((System.ComponentModel.ISupportInitialize)(this.pb_to)).EndInit(); 215 | ((System.ComponentModel.ISupportInitialize)(this.nud_yuzhi)).EndInit(); 216 | ((System.ComponentModel.ISupportInitialize)(this.track_bar_ocap)).EndInit(); 217 | this.ResumeLayout(false); 218 | this.PerformLayout(); 219 | 220 | } 221 | 222 | 223 | #endregion 224 | 225 | private System.Windows.Forms.Button btn_mult_convert; 226 | private System.Windows.Forms.Label label_src_pic_name; 227 | private System.Windows.Forms.Label label2; 228 | private System.Windows.Forms.PictureBox pb_src; 229 | private System.Windows.Forms.PictureBox pb_to; 230 | private System.Windows.Forms.Label tb_yuzhi; 231 | private System.Windows.Forms.NumericUpDown nud_yuzhi; 232 | private System.Windows.Forms.Button btn_save; 233 | private System.Windows.Forms.TextBox tb_data; 234 | private System.Windows.Forms.Label label3; 235 | private System.Windows.Forms.CheckBox cb_ascii; 236 | private System.Windows.Forms.CheckBox cb_text; 237 | private System.Windows.Forms.CheckBox cb_reverse; 238 | private System.Windows.Forms.Button btn_single_convert; 239 | private System.Windows.Forms.TrackBar track_bar_ocap; 240 | private System.Windows.Forms.Label label1; 241 | private System.Windows.Forms.LinkLabel ll_open_source_address; 242 | } 243 | } 244 | 245 | -------------------------------------------------------------------------------- /MainForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace PictureReader 12 | { 13 | public partial class MainForm : Form 14 | { 15 | private string src_pic_name; 16 | public MainForm() 17 | { 18 | InitializeComponent(); 19 | } 20 | 21 | 22 | 23 | private void Btn_mult_convert_Click(object sender, EventArgs e) 24 | { 25 | OpenFileDialog openFileDialog = new OpenFileDialog(); 26 | openFileDialog.Multiselect = true; 27 | if (openFileDialog.ShowDialog() == DialogResult.OK) 28 | { 29 | 30 | string[] filenames = openFileDialog.FileNames; 31 | for (int i = 0; i < filenames.Length; i++) 32 | { 33 | pb_src.Image = Image.FromFile(filenames[i]); 34 | Bitmap bitmap = new Bitmap(pb_src.Image); 35 | Bitmap newPic = convertSize(bitmap, 128, 64); 36 | pb_to.Image = newPic; 37 | src_pic_name = filenames[i]; 38 | newPic.Save(src_pic_name.Substring(0, src_pic_name.LastIndexOf(".")) + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp); 39 | } 40 | MessageBox.Show("转换完成,已保存到同级目录下"); 41 | 42 | } 43 | } 44 | 45 | private void Btn_single_convert_Click(object sender, EventArgs e) 46 | { 47 | OpenFileDialog openFileDialog = new OpenFileDialog(); 48 | if (openFileDialog.ShowDialog() == DialogResult.OK) 49 | { 50 | var filename = openFileDialog.FileName; 51 | 52 | src_pic_name = filename; 53 | label_src_pic_name.Text = filename.Substring(filename.LastIndexOf("\\")+1); 54 | pb_src.Image = Image.FromFile(filename); 55 | convert(); 56 | 57 | } 58 | } 59 | 60 | private Bitmap convertSize(Bitmap srcPicBitmap, int newWidth, int newHeight) 61 | { 62 | 63 | int width = srcPicBitmap.Width; 64 | int height = srcPicBitmap.Height; 65 | int xStart = width % newWidth/2; 66 | int yStart = height % newHeight / 2; 67 | int widthStep = width / newWidth; 68 | int heightStep = height / newHeight; 69 | Bitmap newPicBitmap = new Bitmap(newWidth, newHeight); 70 | int x = 0, y = 0; 71 | for (int i = xStart; i < width- xStart-1; i += widthStep) 72 | { 73 | for (int j = yStart; j < height-yStart-1; j += heightStep) 74 | { 75 | Color color = srcPicBitmap.GetPixel(i, j); 76 | if (cb_reverse.Checked == false) 77 | { 78 | if ((color.R + color.G + color.B) > Convert.ToInt32(nud_yuzhi.Value)) 79 | { 80 | color = Color.Black; 81 | } 82 | else 83 | { 84 | color = Color.White; 85 | } 86 | } 87 | else { 88 | if ((color.R + color.G + color.B) < Convert.ToInt32(nud_yuzhi.Value)) 89 | { 90 | color = Color.Black; 91 | } 92 | else 93 | { 94 | color = Color.White; 95 | } 96 | } 97 | 98 | 99 | newPicBitmap.SetPixel(x, y, color); 100 | y++; 101 | } 102 | y = 0; 103 | x++; 104 | } 105 | convertToArray(newPicBitmap); 106 | return newPicBitmap; 107 | } 108 | 109 | 110 | 111 | 112 | 113 | private void nud_test(object sender, System.EventArgs e) 114 | { 115 | convert(); 116 | } 117 | 118 | private void Btn_save_Click(object sender, EventArgs e) 119 | { 120 | Bitmap newPic = new Bitmap(pb_to.Image); 121 | newPic.Save(src_pic_name.Substring(0,src_pic_name.LastIndexOf("."))+".bmp", System.Drawing.Imaging.ImageFormat.Bmp); 122 | MessageBox.Show("保存成功!"); 123 | } 124 | 125 | private void convertToArray(Bitmap bitmap,int mode) 126 | { 127 | int width = bitmap.Width; 128 | int high = bitmap.Height; 129 | string newString = "unsigned char yize_image[1024]={\r\n"; 130 | int pixel = 0; 131 | Byte ch=0; 132 | for (int i = 0; i < width; i++) 133 | { 134 | for (int j = 0; j < high; j++) { 135 | Color color = bitmap.GetPixel(i, j); 136 | if ((color.R + color.G + color.B) < Convert.ToInt32(nud_yuzhi.Value)) 137 | { 138 | pixel = 0; 139 | } 140 | else 141 | { 142 | pixel = 1; 143 | } 144 | if (j % 8 == 0) 145 | { 146 | newString+=ch+","; 147 | ch = 0; 148 | } 149 | if (pixel == 1) 150 | { 151 | ch |= (Byte)(1 << (j % 8)); 152 | } 153 | } 154 | newString += "\r\n"; 155 | } 156 | tb_data.Text=newString+"};"; 157 | } 158 | 159 | private void convertToArray(Bitmap bitmap) 160 | { 161 | int width = bitmap.Width; 162 | int high = bitmap.Height; 163 | string newString = ""; 164 | int pixel = 0; 165 | Byte ch = 0; 166 | List byteList = new List(); 167 | if (cb_text.Checked) 168 | { 169 | newString += "unsigned char yize_image[1024]={\r\n"; 170 | } 171 | for (int page = 0; page < 8; page++) 172 | { 173 | for (int i = 0; i < 128; i++) 174 | { 175 | for (int j = page * 8; j < page * 8 + 8; j++) 176 | { 177 | Color color = bitmap.GetPixel(i, j); 178 | if ((color.R + color.G + color.B) < Convert.ToInt32(nud_yuzhi.Value)) 179 | { 180 | pixel = 0; 181 | } 182 | else 183 | { 184 | pixel = 1; 185 | } 186 | if (j % 8 == 0) 187 | { 188 | //byteList.Add(ch); 189 | 190 | if (cb_ascii.Checked) 191 | { 192 | newString += ch.ToString("X2") + " "; 193 | }else if(cb_text.Checked){ 194 | newString += ch + ","; 195 | } 196 | 197 | ch = 0; 198 | } 199 | if (pixel == 1) 200 | { 201 | ch |= (Byte)(1 << (j % 8)); 202 | } 203 | } 204 | } 205 | if (cb_text.Checked) 206 | { 207 | newString += "\r\n"; 208 | } 209 | } 210 | //byteList.ToString(); 211 | if (cb_text.Checked) 212 | { 213 | newString += "};"; 214 | } 215 | tb_data.Text = newString ; 216 | 217 | } 218 | 219 | private void Cb_text_CheckedChanged(object sender, EventArgs e) 220 | { 221 | if (cb_ascii.Checked && cb_text.Checked) 222 | { 223 | cb_ascii.Checked = false; 224 | } 225 | else { 226 | cb_ascii.Checked = true; 227 | } 228 | 229 | convert(); 230 | } 231 | 232 | private void Cb_ascii_CheckedChanged(object sender, EventArgs e) 233 | { 234 | if (cb_ascii.Checked && cb_text.Checked) 235 | { 236 | cb_text.Checked = false; 237 | } 238 | else 239 | { 240 | cb_text.Checked = true; 241 | } 242 | if (pb_src.Image == null) 243 | { 244 | MessageBox.Show("请先选择图像","温馨提示"); 245 | return; 246 | } 247 | convert(); 248 | } 249 | 250 | private void Cb_reverse_CheckedChanged(object sender, EventArgs e) 251 | { 252 | convert(); 253 | } 254 | 255 | private void convert() 256 | { 257 | if (pb_src.Image == null) 258 | { 259 | MessageBox.Show("请先选择图像", "温馨提示"); 260 | return; 261 | } 262 | Bitmap bitmap = new Bitmap(pb_src.Image); 263 | Bitmap newPic = convertSize(bitmap, 128, 64); 264 | pb_to.Image = newPic; 265 | } 266 | 267 | private void Track_bar_ocap_ValueChanged(object sender, EventArgs e) 268 | { 269 | MainForm.ActiveForm.Opacity=track_bar_ocap.Value/100.0; 270 | } 271 | 272 | private void Ll_open_source_address_Clicked(object sender, LinkLabelLinkClickedEventArgs e) 273 | { 274 | System.Diagnostics.Process.Start("https://github.com/bestyize/PictureFetcher"); 275 | } 276 | } 277 | } 278 | -------------------------------------------------------------------------------- /PictureFetcher.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {3DEA9B60-F834-49D6-AE8E-14E1896CA23C} 8 | WinExe 9 | PictureReader 10 | PictureReader 11 | v4.7.2 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | ldr_01.ico 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | Form 54 | 55 | 56 | MainForm.cs 57 | 58 | 59 | 60 | 61 | MainForm.cs 62 | 63 | 64 | ResXFileCodeGenerator 65 | Resources.Designer.cs 66 | Designer 67 | 68 | 69 | True 70 | Resources.resx 71 | 72 | 73 | SettingsSingleFileGenerator 74 | Settings.Designer.cs 75 | 76 | 77 | True 78 | Settings.settings 79 | True 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /PictureFetcher.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.28803.452 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PictureFetcher", "PictureFetcher.csproj", "{3DEA9B60-F834-49D6-AE8E-14E1896CA23C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {3DEA9B60-F834-49D6-AE8E-14E1896CA23C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {3DEA9B60-F834-49D6-AE8E-14E1896CA23C}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {3DEA9B60-F834-49D6-AE8E-14E1896CA23C}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {3DEA9B60-F834-49D6-AE8E-14E1896CA23C}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {CF3D0A4C-3F23-4297-9A3E-D5375E42F02C} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace PictureReader 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// 应用程序的主入口点。 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new MainForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("PictureReader")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PictureReader")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("3dea9b60-f834-49d6-ae8e-14e1896ca23c")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本: 4.0.30319.42000 5 | // 6 | // 对此文件的更改可能导致不正确的行为,如果 7 | // 重新生成代码,则所做更改将丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PictureReader.Properties 12 | { 13 | 14 | 15 | /// 16 | /// 强类型资源类,用于查找本地化字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// 返回此类使用的缓存 ResourceManager 实例。 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PictureReader.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// 覆盖当前线程的 CurrentUICulture 属性 56 | /// 使用此强类型的资源类的资源查找。 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PictureReader.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PictureFetcher 2 | 图像取模软件,专为OLED12864打造 3 | 4 | 本软件使用C#编写,支持将图像转为128*64的二值化图像,并且可以批量转换,也支持生成图片对应的字库数组,显示在OLED12864上。 5 | 6 | -------------------------------------------------------------------------------- /ldr_01.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bestyize/PictureFetcher/ed66f5a582300129cb8e10b12291875d7630ddbe/ldr_01.ico --------------------------------------------------------------------------------