Parsi Coders

نسخه‌ی کامل: کمک
شما در حال مشاهده نسخه آرشیو هستید. برای مشاهده نسخه کامل کلیک کنید.
درود:
دوستان من برنامه اسان می خواهم بنویسم کمکم کنید به این صورت که دو عکس را باز کرده و دو عکس تبدیل به یک عکس شوند
به طور مثال:

به وسیله دو پیکچر باکس

عکس اول سمت راست صفحه
عکس دوم سمت چپ صفحه

به صورتی که دقیقا عکس ها بر هم منطبق شوند بعد دو عکس تبدیل به یک عکس که شامل دو عکس است شوند و با فرمتی خاص در ابعاد بزرگ شود و کیفیت ان کنم نشود (اندازه ی عکس مساوی با اندازه ی دو عکس با هم

اگه گیچ شدیم یه خبری بدین
درود
امیر جان چیزی که شما گفتید و اگر من هم درست متوجه شده بهش میگن 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

موفق باشید
اینم یه سورس در این زمینه البته من رو سیستم سی شارپ نداشم شاید به کارت بیاد.
دانلود :
[attachment=59]
کد:
www.parsicoders.com
درود:
ممنون دوست عزیز ولی من هر چی پروژه مینویسم یا دانلود میکنم مشکل داره مشکل اینم هست
[عکس: 104r2hbq01qwqldedl.jpg]

به نظرت مشکل چیه ؟
ممنون امین جان