• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 7 رای - 3.43 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: کمک
حالت خطی
#2
درود
امیر جان چیزی که شما گفتید و اگر من هم درست متوجه شده بهش میگن merging image
امیر پروژه کامل خواستی شما باید فعالیت کنی و هر جا اشکال داشتی بگی تا ما بهت کمک کنیم .
من 2سورس کد برات پیوست میکنم که جوابتو میده و میتونه منبع خوبی برای یادگیریت باشه !

merging image
کد:
/// <summary>
        /// Merges 4 Images into 1 <strong class="highlight">Image</strong>.
        /// </summary>
        /// <param name="image1">The <strong class="highlight">Image</strong> you want in the Top-Left Corner.</param>
        /// <param name="image2">The <strong class="highlight">Image</strong> you want in the Top-Right Corner.</param>
        /// <param name="image3">The <strong class="highlight">Image</strong> you want in the Bottom-Left Corner.</param>
        /// <param name="image4">The <strong class="highlight">Image</strong> you want in the Bottom-Right Corner.</param>
        /// <returns>An <strong class="highlight">Image</strong> of 4</returns>
        public <strong class="highlight">Image</strong> MergeImages(<strong class="highlight">Image</strong> image1, <strong class="highlight">Image</strong> image2, <strong class="highlight">Image</strong> image3, <strong class="highlight">Image</strong> image4)
        {
            //Get the Width of All the Images
            Int32 width = image1.Width + image2.Width + image3.Width + image4.Width;
            //Get the Height of All the Images
            Int32 height = image1.Height + image2.Height + image3.Height + image4.Height;
            //Create a new Bitmap with the Width and Height
            Bitmap bitmap = new Bitmap(width, height);

            //Get All of the x Pixels
            for (int w = 0; w < image1.Width; w++)
            {
                //Get All of the Y Pixels
                for (int h = 0; h < image1.Height; h++)
                {
                    //Create a new Bitmap from image1
                    Bitmap <strong class="highlight">image</strong> = new Bitmap(image1);
                    //Set the Cooresponding Pixel
                    bitmap.SetPixel(w, h, <strong class="highlight">image</strong>.GetPixel(w, h));
                }
            }
            //Get All of the x Pixels
            for (int w = 0; w < image2.Width; w++)
            {
                //Get All of the Y Pixels
                for (int h = 0; h < image2.Height; h++)
                {
                    //Create a new Bitmap from image2
                    Bitmap <strong class="highlight">image</strong> = new Bitmap(image2);
                    //Set the Cooresponding Pixel
                    bitmap.SetPixel(<strong class="highlight">image</strong>.Width + w, h, <strong class="highlight">image</strong>.GetPixel(w, h));
                }
            }
            //Get All of the x Pixels
            for (int w = 0; w < image3.Width; w++)
            {
                //Get All of the Y Pixels
                for (int h = 0; h < image3.Height; h++)
                {
                    //Create a new Bitmap from image3
                    Bitmap <strong class="highlight">image</strong> = new Bitmap(image3);
                    //Set the Cooresponding Pixel
                    bitmap.SetPixel(w, <strong class="highlight">image</strong>.Height + h, <strong class="highlight">image</strong>.GetPixel(w, h));
                }
            }
            //Get All of the x Pixels
            for (int w = 0; w < image4.Width; w++)
            {
                //Get All of the Y Pixels
                for (int h = 0; h < image4.Height; h++)
                {
                    //Create a new Bitmap from image4
                    Bitmap <strong class="highlight">image</strong> = new Bitmap(image4);
                    //Set the Cooresponding Pixel
                    bitmap.SetPixel(<strong class="highlight">image</strong>.Width + w, <strong class="highlight">image</strong>.Height + h, <strong class="highlight">image</strong>.GetPixel(w, h));
                }
            }
            
            //Return the new Bitmap
            return bitmap;
        }

اگر میخوای بیشتر سر در بیاری و سورس کد دوم هم ببینی به لینک زیر سر بزن

http://www.switchonthecode.com/tutorials...ith-csharp

http://www.dotnetspider.com/resources/41...image.aspx

موفق باشید
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
 
پاسخ
  


پیام‌های این موضوع
کمک - توسط امیر - 10-06-2011، 02:54 PM
RE: کمک - توسط Amin_Mansouri - 10-06-2011، 03:20 PM
RE: کمک - توسط Amin_Mansouri - 10-10-2011، 12:05 AM
RE: کمک - توسط امیر - 10-10-2011، 12:28 PM

پرش به انجمن:


Browsing: 1 مهمان