تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مشروع يتيح للمستخدم استخراج الألوان من الصور
#1
الهدف:

هدف المشروع هو إنشاء تطبيق يتيح للمستخدم استخراج الألوان من الصور.

المكونات الرئيسية:
PictureBox (صندوق الصورة): يُستخدم لعرض الصورة المحددة من قبل المستخدم.
TextBox (مربع النص): يُستخدم لعرض مسار الصورة المحددة.
Button (زر التصفح): يُستخدم لتحميل الصورة من ملف.
ListBox (قائمة الألوان): تُستخدم لعرض الألوان المستخرجة من الصورة.
Label (التسمية): يُستخدم لعرض تفاصيل اللون المحدد.
كيف يعمل؟
يقوم المستخدم بالنقر على زر "تصفح" لاختيار صورة من ملفه الشخصي.
بعد تحميل الصورة، يمكن للمستخدم النقر على أي نقطة في الصورة.
عند النقر، يتم استخراج لون البكسل المحدد وعرضه في Label بالإضافة إلى عرض اسم اللون إن وجد في ListBox.
الأشياء التي يمكن تحسينها:
إضافة مزيد من التفاصيل لكيفية استخراج الألوان مثل قيمة الألفا والمزيد.
إضافة ميزات إضافية مثل حفظ الألوان المستخرجة في ملف أو تحديد الألوان المشابهة.
تحسين واجهة المستخدم وتوفير خيارات أكثر لتخصيص العرض والوظائف.


الملفات المرفقة
.rar   ColorSnap.rar (الحجم : 34.06 ك ب / التحميلات : 47)
لو كل مسلم رمى دلو ماء لغرقت إسرائيل 
الرد }}}
تم الشكر بواسطة: Taha Okla
#2
مشروع جيد وبسيط .. بارك الله فيك.

--
لدي تعديل بسيط على المشروع : لتجاوز أخطاء منطقة التحديد في حال الصور الصغيرة، ومن أجل عرض الصور الكبيرة،
نبدل الكود الموجود في نافذة كود التصميم (Designer) بالكود التالي :

كود :
namespace ColorSnap
{
   partial class Form1
   {
       /// <summary>
       /// Required designer variable.
       /// </summary>
       private System.ComponentModel.IContainer components = null;

       /// <summary>
       /// Clean up any resources being used.
       /// </summary>
       /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
       protected override void Dispose(bool disposing)
       {
           if (disposing && (components != null))
           {
               components.Dispose();
           }
           base.Dispose(disposing);
       }

       #region Windows Form Designer generated code

       /// <summary>
       /// Required method for Designer support - do not modify
       /// the contents of this method with the code editor.
       /// </summary>
       private void InitializeComponent()
       {
           this.txtFilePath = new System.Windows.Forms.TextBox();
           this.btnBrowse = new System.Windows.Forms.Button();
           this.lblColor = new System.Windows.Forms.Label();
           this.pictureBox = new System.Windows.Forms.PictureBox();
           this.listBoxColors = new System.Windows.Forms.ListBox();
           this.panel1 = new System.Windows.Forms.Panel();
           ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
           this.panel1.SuspendLayout();
           this.SuspendLayout();
           //
           // txtFilePath
           //
           this.txtFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
           | System.Windows.Forms.AnchorStyles.Right)));
           this.txtFilePath.Location = new System.Drawing.Point(9, 17);
           this.txtFilePath.Name = "txtFilePath";
           this.txtFilePath.Size = new System.Drawing.Size(548, 20);
           this.txtFilePath.TabIndex = 0;
           //
           // btnBrowse
           //
           this.btnBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
           this.btnBrowse.Location = new System.Drawing.Point(563, 15);
           this.btnBrowse.Name = "btnBrowse";
           this.btnBrowse.Size = new System.Drawing.Size(75, 23);
           this.btnBrowse.TabIndex = 1;
           this.btnBrowse.Text = "Browse";
           this.btnBrowse.UseVisualStyleBackColor = true;
           this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
           //
           // lblColor
           //
           this.lblColor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
           this.lblColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
           this.lblColor.Location = new System.Drawing.Point(644, 15);
           this.lblColor.Name = "lblColor";
           this.lblColor.Size = new System.Drawing.Size(165, 23);
           this.lblColor.TabIndex = 4;
           this.lblColor.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
           //
           // pictureBox
           //
           this.pictureBox.Location = new System.Drawing.Point(3, 3);
           this.pictureBox.Name = "pictureBox";
           this.pictureBox.Size = new System.Drawing.Size(318, 283);
           this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
           this.pictureBox.TabIndex = 3;
           this.pictureBox.TabStop = false;
           this.pictureBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.pictureBox_MouseClick_1);
           //
           // listBoxColors
           //
           this.listBoxColors.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
           | System.Windows.Forms.AnchorStyles.Right)));
           this.listBoxColors.FormattingEnabled = true;
           this.listBoxColors.Location = new System.Drawing.Point(644, 44);
           this.listBoxColors.Name = "listBoxColors";
           this.listBoxColors.Size = new System.Drawing.Size(165, 394);
           this.listBoxColors.TabIndex = 4;
           //
           // panel1
           //
           this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
           | System.Windows.Forms.AnchorStyles.Left)
           | System.Windows.Forms.AnchorStyles.Right)));
           this.panel1.AutoScroll = true;
           this.panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
           this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
           this.panel1.Controls.Add(this.pictureBox);
           this.panel1.Location = new System.Drawing.Point(9, 43);
           this.panel1.Name = "panel1";
           this.panel1.Size = new System.Drawing.Size(629, 395);
           this.panel1.TabIndex = 5;
           //
           // Form1
           //
           this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
           this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
           this.BackColor = System.Drawing.Color.White;
           this.ClientSize = new System.Drawing.Size(822, 450);
           this.Controls.Add(this.panel1);
           this.Controls.Add(this.listBoxColors);
           this.Controls.Add(this.lblColor);
           this.Controls.Add(this.btnBrowse);
           this.Controls.Add(this.txtFilePath);
           this.Name = "Form1";
           this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
           this.Text = "التقاط الألوان";
           this.Load += new System.EventHandler(this.Form1_Load);
           ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
           this.panel1.ResumeLayout(false);
           this.panel1.PerformLayout();
           this.ResumeLayout(false);
           this.PerformLayout();

       }

       #endregion

       private System.Windows.Forms.TextBox txtFilePath;
       private System.Windows.Forms.Button btnBrowse;
       private System.Windows.Forms.Label lblColor;
       private System.Windows.Forms.PictureBox pictureBox;
       private System.Windows.Forms.ListBox listBoxColors;
       private System.Windows.Forms.Panel panel1;
   }
}
ثم نغلق نافذة عرض التصميم[Design]، ثم نعرضها من جديد ليتم عليها التعديل..
قال صلى الله عليه وسلم: 
«كلمتان خفيفتان على اللسان 
ثقيلتان في الميزان،حبيبتان إلى الرحمن: 
سبحان الله وبحمده، سبحان الله العظيم».
الرد }}}
تم الشكر بواسطة: العتيق


المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  مشروع انشاء قاعدة بيانات sqlite Kamil 13 2,129 02-11-25, 12:44 AM
آخر رد: ba2e44ca9a
  [مشروع] تحويل مجموعة من الصور و ملف صوت justforit 1 286 10-10-25, 11:52 PM
آخر رد: justforit
  مشروع نظام مكتب المقاولات مصطفى نهشل 1 743 27-09-25, 11:07 PM
آخر رد: ba2e44ca9a
  مشروع تفقيط الأرقام عربي / إنجليزي متعدد العملات [منقول]. asemshahen5 12 17,043 18-07-25, 11:00 AM
آخر رد: amonem
  مشروع النسخ الاحتياطي sqllite Kamil 19 1,832 20-01-25, 11:54 AM
آخر رد: salamandal
Video [درس فيديو] مشروع سي شارب استخراج النص من الصورة ويدعم اللغه العربية ahmadpal 4 4,881 08-12-24, 06:27 PM
آخر رد: GOGOME
Heart [مشروع] النسخة السابعة من برنامج استخراج مكتبة برمجية لاي قاعدة بيانات Sqlite 3 ربيع الهمداني 3 3,324 07-07-24, 06:13 PM
آخر رد: salamandal
  مشروع ضغط و صيانة قاعدة بيانات Sql Server غزة العزة 0 740 02-06-24, 12:32 AM
آخر رد: غزة العزة
  نقل البيانات من DataGridView إلى ملف Excel في مشروع C# غزة العزة 3 811 22-05-24, 07:10 PM
آخر رد: العتيق
  مشروع تقريب الارقام Kamil 0 525 01-01-24, 09:04 PM
آخر رد: Kamil

التنقل السريع :


يقوم بقرائة الموضوع: