From 05c2f23e9cc7561ce84e11bf6094d24c58a72401 Mon Sep 17 00:00:00 2001 From: Roman <30943474+RezWaki@users.noreply.github.com> Date: Wed, 8 Mar 2023 00:39:49 +0300 Subject: [PATCH] initial src upload --- ascii_converter.sln | 20 ++ ascii_converter/ascii_converter.aps | Bin 0 -> 40636 bytes ascii_converter/ascii_converter.rc | Bin 0 -> 5674 bytes ascii_converter/ascii_converter.vcxproj | 103 ++++++ .../ascii_converter.vcxproj.filters | 45 +++ ascii_converter/ascii_converter.vcxproj.user | 4 + ascii_converter/icon.ico | Bin 0 -> 3262 bytes ascii_converter/main.cpp | 11 + ascii_converter/main.h | 297 ++++++++++++++++++ ascii_converter/main.resx | 120 +++++++ ascii_converter/resource.h | Bin 0 -> 614 bytes 11 files changed, 600 insertions(+) create mode 100644 ascii_converter.sln create mode 100644 ascii_converter/ascii_converter.aps create mode 100644 ascii_converter/ascii_converter.rc create mode 100644 ascii_converter/ascii_converter.vcxproj create mode 100644 ascii_converter/ascii_converter.vcxproj.filters create mode 100644 ascii_converter/ascii_converter.vcxproj.user create mode 100644 ascii_converter/icon.ico create mode 100644 ascii_converter/main.cpp create mode 100644 ascii_converter/main.h create mode 100644 ascii_converter/main.resx create mode 100644 ascii_converter/resource.h diff --git a/ascii_converter.sln b/ascii_converter.sln new file mode 100644 index 0000000..13a261a --- /dev/null +++ b/ascii_converter.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ascii_converter", "ascii_converter\ascii_converter.vcxproj", "{0B760371-82E5-4FA2-9801-B4EC53B0916D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0B760371-82E5-4FA2-9801-B4EC53B0916D}.Debug|Win32.ActiveCfg = Debug|Win32 + {0B760371-82E5-4FA2-9801-B4EC53B0916D}.Debug|Win32.Build.0 = Debug|Win32 + {0B760371-82E5-4FA2-9801-B4EC53B0916D}.Release|Win32.ActiveCfg = Release|Win32 + {0B760371-82E5-4FA2-9801-B4EC53B0916D}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ascii_converter/ascii_converter.aps b/ascii_converter/ascii_converter.aps new file mode 100644 index 0000000000000000000000000000000000000000..df699b69b915fda94c256b8166c4c1f98cf3f05f GIT binary patch literal 40636 zcmeHwdAMXpb>A6j5C~x`Y>e0}MnVQDMxt+bzxVpF>h|s1?={mK-Tmh2DPuR|(MXIL zX6zZsmK}$W>~=n5yd<`<5sLvCJ7!-JFNqV&j)n6%csB;bz9|vl1@MAl@;j%hZk?)I z{f6X^_#e&p&FH=Q{p!?m>(+8k-Jghv4&m?l^X4yp4E~(LZ`a`OHtkXu|2=>HfW{?W2cYy&K$qv#V1bRe(vazljrU@cIwdl_B(DldFD{F zku{G_&z||t6UTuaJ9qr#$>s4gr@!aK+1pQ?z0mJBoIOsL^yB*6E7fSwsPrOP)6TC2L`=jIbY<9K|$AEpIt}S6LO(72bQCLvFs0qC8*Xp!z@)+=YOA`R4Jh;d}Ma{c8I0I+};sFs2qk zHXckmpFEuFXc1=Pem8}w;!QT2z=p4*9h)s54sGT8_%p;bV+O}~B170T*f#8_#bj9P z7Wt~#F=gxaZ8ifBG0m@fz|vh8e7ohFai?=gifM)#($~?_=CFfNXE8}Z9+Z0>y?|e9 zjF8@-$QP5@5>padS#C5MbZZ0^n6nI)(QOen-r@HU*_wp;EwDH*X56X3T68kPCP#R% z0BX~BM$oL}F$rjmUKBxx^Kovlbvh;3yqxAUu0J*CG#$wMH!T-~5ngrFq(7L=rA-Ce z^ivVo8_e-;>@D-{UCgoN5e!kb%+#NbsQJ!fvXu8}J~VHY=4bSZ3-Bj93!R}!KNDpr zw#(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}P>TfEHel{rn)uZu}OD@6l)hS>5_^b>*_``!e z@L&%-*aQEcd!Smm{(*jYG|D}Mzs{e))zJE=e0n)Rhd|*|44--q;D0hZuM;5T2+c>3J?e*kI8eh&Zu literal 0 HcmV?d00001 diff --git a/ascii_converter/ascii_converter.rc b/ascii_converter/ascii_converter.rc new file mode 100644 index 0000000000000000000000000000000000000000..1868ef33ac55902574265f002f9b71fd36ed7c6a GIT binary patch literal 5674 zcmd6rS#KLR5Xa}aK)=IQerb@vN0OI5+On()l`SJW+5!dyHI`kWwiM`SouHq+?e9-& zyoXjztQy5)u}ki7W;mRaZWDWNbDPY*Fq7 zyqiEL-p6)nUF%ujPOW7f8`?W-06nFDVQu>vNSE)qod9Xm_xUA5^&Xeb+r*marKsZ@ zv^2AO*1tqM(nF6`|HQY&s_U#%`e*=u&0Dm{=WQ^;>JMwWy#A}FF_$QM#|mA^lWth| zZoc7~cfQqXUAhE6UlCagB4Nau6ZxI@31LT-2DTltXrzqb$4E@YZ5(so52|<_a&4c|MhLn?!GRl<2AR?1kKW zO^hj@#79;u%PpJUCf#l4uxtEgy{1}yt=HdbNtTsH66!x8GN$Zc?y&BHDyj_H2Qqow z$#m((ea#}|y<#2xzw@c0vi}A7RCrA?Ws5xeeQ7?;V+`RM_eHLotiGz#cj>&Y0tOZppeFX7)I zU-qe#y)UA0?q{LKHIeR|>ei)FC2)VRH{_dkkVH8&t#Ppuo-k9hAZN-cayWXVALHQ* z^psy$5&tlQuN{)x;lymbOp69BS9NKqbMZfUPSD}=qtdjbuw*%~`-M4g5 zLvHQTKZG6HNBnEV-x#>|I5oUxY@h5$pue$}@>$FI`r1$7kUd?+IB@>*s5<&-F`Fcr z+V9}cLw=j@G+#d6e4Zmtb=$O7F28K1^WvOVC(5E`MqyPGv@+y$Sd@Gp$_L)3Xsi?b z<~I0_W^@f|{;W-&f96YOo)J+iRGRnrKhM)GmG1f6W}A?F+zim&{85v;#9=;K zdT`TOW`TWFceCECtQezIv2(nLZQ9eg-s;q_q9iVzw+Yc2J>DT|y`PRI z_6PdW=|4eRGyaqbbW_u!5+y{synF>TA^%99x{J~MjP6cUGljc^G661~>%KtL6}mxZd&TF6iTW^qw}}L`dRRsLXY8{Y5y_ zxDS@KEwY*L%EroIwMW_a*S(lIw(rfKXJ=Tnb#?yTr@W23jDNd1**x7;XEjAhJX*Z{ muXkuVZ5H?b`8zb%V^Nao{7b^^{yrs26|0*!W}9{wr+)xFL8Zh1 literal 0 HcmV?d00001 diff --git a/ascii_converter/ascii_converter.vcxproj b/ascii_converter/ascii_converter.vcxproj new file mode 100644 index 0000000..9623da3 --- /dev/null +++ b/ascii_converter/ascii_converter.vcxproj @@ -0,0 +1,103 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {0B760371-82E5-4FA2-9801-B4EC53B0916D} + v2.0 + ManagedCProj + ascii_converter + + + + Application + true + v110 + true + Unicode + + + Application + false + v110 + true + Unicode + false + + + + + + + + + + + + + true + + + false + + + + Level3 + Disabled + WIN32;_DEBUG;%(PreprocessorDefinitions) + + + true + + + + + + Level3 + WIN32;NDEBUG;%(PreprocessorDefinitions) + Full + + + true + + + + + + + + + + + + + + + + CppForm + + + + + + main.h + + + + + + + + + + + + \ No newline at end of file diff --git a/ascii_converter/ascii_converter.vcxproj.filters b/ascii_converter/ascii_converter.vcxproj.filters new file mode 100644 index 0000000..d79de20 --- /dev/null +++ b/ascii_converter/ascii_converter.vcxproj.filters @@ -0,0 +1,45 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + + + Source Files + + + + + Resource Files + + + + + Resource Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/ascii_converter/ascii_converter.vcxproj.user b/ascii_converter/ascii_converter.vcxproj.user new file mode 100644 index 0000000..7cbb321 --- /dev/null +++ b/ascii_converter/ascii_converter.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ascii_converter/icon.ico b/ascii_converter/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..bba6792e7597d76739275edca506538046c8bb04 GIT binary patch literal 3262 zcmeH|F>Zt~5JkNW4QXgXDnvn%niE8#phDs#6dZt?(4yRfhD&e&BuYd>kvwIjk!5RF zTV)#?*&6D0$Svt>bg!43Pd7FlCmt1;}G0l zhhea9iRn|o>$-RZRrDFwbxqTBSr$K~oDcY^8OKqzoJyKU8s>f9os^Oj_$lq5EFD%= z#e)-w)qu(@hTxb_q7r_}=BJEXY-g1%Vw$tdJ|<HL1u8X30z|Z;Kld!3T n!RcQb#%Ia0+HYeNMVzmVJpX +#include "main.h" +#pragma comment( lib, "user32.lib" ) + +using namespace System; +using namespace System::Windows::Forms; +[STAThread] +BOOL WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, INT ) { + Application::Run( gcnew ascii_converter::main ); + return TRUE; +} \ No newline at end of file diff --git a/ascii_converter/main.h b/ascii_converter/main.h new file mode 100644 index 0000000..b9acc5f --- /dev/null +++ b/ascii_converter/main.h @@ -0,0 +1,297 @@ +#pragma once + +namespace ascii_converter { + + using namespace System; + using namespace System::ComponentModel; + using namespace System::Collections; + using namespace System::Windows::Forms; + using namespace System::Data; + using namespace System::Drawing; + + /// + /// Summary for main + /// + public ref class main : public System::Windows::Forms::Form + { + public: + main(void) + { + InitializeComponent(); + // + //TODO: Add the constructor code here + // + } + + protected: + /// + /// Clean up any resources being used. + /// + ~main() + { + if (components) + { + delete components; + } + } + private: System::Windows::Forms::Label^ label1; + protected: + private: System::Windows::Forms::TextBox^ textBox1; + private: System::Windows::Forms::Button^ button1; + private: System::Windows::Forms::PictureBox^ pictureBox1; + private: System::Windows::Forms::RichTextBox^ richTextBox1; + private: System::Windows::Forms::Button^ button2; + private: System::Windows::Forms::TextBox^ textBox2; + private: System::Windows::Forms::Label^ label2; + private: System::Windows::Forms::TextBox^ textBox3; + private: System::Windows::Forms::Label^ label3; + + private: System::Windows::Forms::TextBox^ textBox4; + private: System::Windows::Forms::Label^ label4; + private: System::Windows::Forms::CheckBox^ checkBox1; + + private: + /// + /// Required designer variable. + /// + System::ComponentModel::Container ^components; + +#pragma region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + void InitializeComponent(void) + { + this->label1 = (gcnew System::Windows::Forms::Label()); + this->textBox1 = (gcnew System::Windows::Forms::TextBox()); + this->button1 = (gcnew System::Windows::Forms::Button()); + this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox()); + this->richTextBox1 = (gcnew System::Windows::Forms::RichTextBox()); + this->button2 = (gcnew System::Windows::Forms::Button()); + this->textBox2 = (gcnew System::Windows::Forms::TextBox()); + this->label2 = (gcnew System::Windows::Forms::Label()); + this->textBox3 = (gcnew System::Windows::Forms::TextBox()); + this->label3 = (gcnew System::Windows::Forms::Label()); + this->textBox4 = (gcnew System::Windows::Forms::TextBox()); + this->label4 = (gcnew System::Windows::Forms::Label()); + this->checkBox1 = (gcnew System::Windows::Forms::CheckBox()); + (cli::safe_cast(this->pictureBox1))->BeginInit(); + this->SuspendLayout(); + // + // label1 + // + this->label1->AutoSize = true; + this->label1->Location = System::Drawing::Point(12, 9); + this->label1->Name = L"label1"; + this->label1->Size = System::Drawing::Size(55, 13); + this->label1->TabIndex = 0; + this->label1->Text = L"Image file:"; + // + // textBox1 + // + this->textBox1->Location = System::Drawing::Point(73, 6); + this->textBox1->Name = L"textBox1"; + this->textBox1->Size = System::Drawing::Size(474, 20); + this->textBox1->TabIndex = 1; + this->textBox1->Text = L"image.bmp"; + // + // button1 + // + this->button1->Location = System::Drawing::Point(553, 4); + this->button1->Name = L"button1"; + this->button1->Size = System::Drawing::Size(75, 23); + this->button1->TabIndex = 2; + this->button1->Text = L"Load..."; + this->button1->UseVisualStyleBackColor = true; + this->button1->Click += gcnew System::EventHandler(this, &main::button1_Click); + // + // pictureBox1 + // + this->pictureBox1->Location = System::Drawing::Point(15, 32); + this->pictureBox1->Name = L"pictureBox1"; + this->pictureBox1->Size = System::Drawing::Size(303, 218); + this->pictureBox1->TabIndex = 3; + this->pictureBox1->TabStop = false; + // + // richTextBox1 + // + this->richTextBox1->Font = (gcnew System::Drawing::Font(L"Lucida Console", 10)); + this->richTextBox1->Location = System::Drawing::Point(325, 32); + this->richTextBox1->Name = L"richTextBox1"; + this->richTextBox1->ReadOnly = true; + this->richTextBox1->ScrollBars = System::Windows::Forms::RichTextBoxScrollBars::ForcedBoth; + this->richTextBox1->Size = System::Drawing::Size(303, 218); + this->richTextBox1->TabIndex = 4; + this->richTextBox1->Text = L""; + this->richTextBox1->WordWrap = false; + // + // button2 + // + this->button2->Location = System::Drawing::Point(15, 282); + this->button2->Name = L"button2"; + this->button2->Size = System::Drawing::Size(613, 23); + this->button2->TabIndex = 5; + this->button2->Text = L"Make ASCII..."; + this->button2->UseVisualStyleBackColor = true; + this->button2->Click += gcnew System::EventHandler(this, &main::button2_Click); + // + // textBox2 + // + this->textBox2->Location = System::Drawing::Point(73, 256); + this->textBox2->Name = L"textBox2"; + this->textBox2->Size = System::Drawing::Size(90, 20); + this->textBox2->TabIndex = 7; + this->textBox2->Text = L".;O;|"; + // + // label2 + // + this->label2->AutoSize = true; + this->label2->Location = System::Drawing::Point(12, 259); + this->label2->Name = L"label2"; + this->label2->Size = System::Drawing::Size(37, 13); + this->label2->TabIndex = 6; + this->label2->Text = L"Chars:"; + // + // textBox3 + // + this->textBox3->Location = System::Drawing::Point(386, 256); + this->textBox3->Name = L"textBox3"; + this->textBox3->Size = System::Drawing::Size(90, 20); + this->textBox3->TabIndex = 9; + this->textBox3->Text = L"2"; + // + // label3 + // + this->label3->AutoSize = true; + this->label3->Location = System::Drawing::Point(325, 259); + this->label3->Name = L"label3"; + this->label3->Size = System::Drawing::Size(49, 13); + this->label3->TabIndex = 8; + this->label3->Text = L"W scale:"; + // + // textBox4 + // + this->textBox4->Location = System::Drawing::Point(229, 256); + this->textBox4->Name = L"textBox4"; + this->textBox4->Size = System::Drawing::Size(90, 20); + this->textBox4->TabIndex = 12; + this->textBox4->Text = L"10"; + // + // label4 + // + this->label4->AutoSize = true; + this->label4->Location = System::Drawing::Point(168, 259); + this->label4->Name = L"label4"; + this->label4->Size = System::Drawing::Size(58, 13); + this->label4->TabIndex = 11; + this->label4->Text = L"Tolerance:"; + // + // checkBox1 + // + this->checkBox1->AutoSize = true; + this->checkBox1->Checked = true; + this->checkBox1->CheckState = System::Windows::Forms::CheckState::Checked; + this->checkBox1->Location = System::Drawing::Point(482, 258); + this->checkBox1->Name = L"checkBox1"; + this->checkBox1->Size = System::Drawing::Size(85, 17); + this->checkBox1->TabIndex = 13; + this->checkBox1->Text = L"Add shadow"; + this->checkBox1->UseVisualStyleBackColor = true; + // + // main + // + this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); + this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; + this->ClientSize = System::Drawing::Size(643, 313); + this->Controls->Add(this->checkBox1); + this->Controls->Add(this->textBox4); + this->Controls->Add(this->label4); + this->Controls->Add(this->textBox3); + this->Controls->Add(this->label3); + this->Controls->Add(this->textBox2); + this->Controls->Add(this->label2); + this->Controls->Add(this->button2); + this->Controls->Add(this->richTextBox1); + this->Controls->Add(this->pictureBox1); + this->Controls->Add(this->button1); + this->Controls->Add(this->textBox1); + this->Controls->Add(this->label1); + this->DoubleBuffered = true; + this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle; + this->MaximizeBox = false; + this->Name = L"main"; + this->Text = L"ASCII Converter"; + (cli::safe_cast(this->pictureBox1))->EndInit(); + this->ResumeLayout(false); + this->PerformLayout(); + + } +#pragma endregion + + array< unsigned int, 2 >^ pixels; + Color pixel; + INT w, h, wscale, tolerance, bAddShadow; + + void button1_Click( Object^ sender, EventArgs^ e ) { + Bitmap^ image = nullptr; + try { //catching exceptions + image = (Bitmap^)Image::FromFile(textBox1->Text); + } + catch( BadImageFormatException^ ) { + MessageBoxA( NULL, "Error\n\tCan't load specified image\n\tBadImageFormat", NULL, MB_ICONERROR ); + return; + } + catch( OutOfMemoryException^ ) { + MessageBoxA( NULL, "Error\n\tCan't load specified image\n\tOutOfMemory", NULL, MB_ICONERROR ); + return; + } + catch( IO::FileNotFoundException^ ) { + MessageBoxA( NULL, "Error\n\tCan't load specified image\n\tFileNotFound", NULL, MB_ICONERROR ); + return; + } + w = image->Width, h = image->Height; + tolerance = Convert::ToInt16( textBox4->Text ); + pixels = gcnew array< unsigned int, 2 >(w, h); //make a 2-dimensional array to store pixel data in + for( INT y = 0; y < h; y++ ) { + for( INT x = 0; x < w; x++ ) { //thumb thru the pixels + pixel = image->GetPixel(x, y); //get pixel color + pixels[x, y] = (pixel.R > tolerance && pixel.G > tolerance && pixel.B > tolerance); + } //check if the pixel is bright enough to tolerate it as something we should draw + } + pictureBox1->Image = image; //load the image into picture-box + } + + void button2_Click( Object^ sender, EventArgs^ e ) { + richTextBox1->Clear(); //clear the previous art + wscale = Convert::ToInt16( textBox3->Text ); //set w-scale + bAddShadow = checkBox1->Checked; + wchar_t chars[3] = { Convert::ToChar(textBox2->Text->Substring(0, 1)), + Convert::ToChar(textBox2->Text->Substring(2, 1)), + Convert::ToChar(textBox2->Text->Substring(4, 1)) }; //set our characters + for( INT y = 0; y < h; y++ ) { + for( INT x = 0; x < w; x++ ) { //thumb thru the pixels array & process it + for( INT s = 0; s < wscale; s++ ) { //if we need to scale by width, do so + if( pixels[x, y] ) { + if( x && x < w-1 ) { //still within the bounds + if( bAddShadow && ((pixels[x-1, y] && !pixels[x, y]) || (!pixels[x+1, y] && pixels[x, y])) ) + richTextBox1->Text += chars[2].ToString(); + else richTextBox1->Text += chars[0].ToString(); + } + else richTextBox1->Text += chars[0].ToString(); + } + else richTextBox1->Text += chars[1].ToString(); + } + } + richTextBox1->Text += "\n"; //new-line determinator after each vertical line + } + } + + void button3_Click( Object^ sender, EventArgs^ e ) { + if( richTextBox1->Text != String::Empty ) { //if the art has been drawn + Clipboard::Clear(); //clear the previously stored data + Clipboard::SetText( richTextBox1->Text ); //paste it into clipboard + } + } +}; +} diff --git a/ascii_converter/main.resx b/ascii_converter/main.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/ascii_converter/main.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ascii_converter/resource.h b/ascii_converter/resource.h new file mode 100644 index 0000000000000000000000000000000000000000..fdd97cb0eda44dbacf645f23bcddce71c5eb3071 GIT binary patch literal 614 zcmb7C%L>9U5S+8%KLqjvR{Vk3_8|5lrV%~mq6IJg|C2hK6r@FhWl6hTGBdk7eZMsB zc%a7<1K$b<6g-|MM~em-YfB=-hL|;0;b`*qqk@9L2^Jk(&}f57g9~+zC|MI!L<|Yc znRg9uOLrA+WU+kK*t1eGk1W%v{HX1TDRE^F9>QaZam;e&o}CynIOg+-WvcDp%(A(f zVW?Ilc@=hKmWVr>yYZ{<=u5}0W!_ZRimc1H<0i$6G_UOE>$K*dBaVsJar@Kn4?q@B A2><{9 literal 0 HcmV?d00001