亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? usercontrol1.cs

?? mpeg4壓縮算法程序
?? CS
?? 第 1 頁 / 共 2 頁
字號:
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.IO;
using BitmapImage;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;


namespace MPEGBuilder1UI
{
	/// <summary>
	/// Summary description for UserControl1.
	/// </summary>
	public class UserControl1 : System.Windows.Forms.UserControl
	{
		private System.Windows.Forms.PictureBox pictureBox1;
		private System.Windows.Forms.PictureBox pictureBox2;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button button2;
		private System.ComponentModel.IContainer components;

		public int mode = 16;
		public int nPictures = 1;
		private double stretchX = 1.0;
		private double stretchY = 1.0;
		private int xPos = 0;
		private int yPos = 0;
		private long outBytes = 0;
		private long inputFileLength = 0;

		public System.Windows.Forms.TextBox textBox1;
		public System.Windows.Forms.TextBox textBox2;
		public System.Windows.Forms.TextBox textBox3;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.ToolTip toolTip1;
		private System.Windows.Forms.ToolTip toolTip2;
		private System.Windows.Forms.ToolTip toolTip3;
		private System.Windows.Forms.Label label2;

		public UserControl1()
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			this.SetStyle(ControlStyles.ResizeRedraw, true);
			this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
			this.SetStyle(ControlStyles.DoubleBuffer, true);
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if( components != null )
					components.Dispose();
			}
			base.Dispose( disposing );
		}

		#region Component 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.components = new System.ComponentModel.Container();
			this.pictureBox1 = new System.Windows.Forms.PictureBox();
			this.pictureBox2 = new System.Windows.Forms.PictureBox();
			this.button1 = new System.Windows.Forms.Button();
			this.button2 = new System.Windows.Forms.Button();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.textBox3 = new System.Windows.Forms.TextBox();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
			this.toolTip2 = new System.Windows.Forms.ToolTip(this.components);
			this.toolTip3 = new System.Windows.Forms.ToolTip(this.components);
			this.SuspendLayout();
			// 
			// pictureBox1
			// 
			this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand;
			this.pictureBox1.Location = new System.Drawing.Point(16, 32);
			this.pictureBox1.Name = "pictureBox1";
			this.pictureBox1.Size = new System.Drawing.Size(352, 352);
			this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
			this.pictureBox1.TabIndex = 0;
			this.pictureBox1.TabStop = false;
			this.toolTip1.SetToolTip(this.pictureBox1, "Use File->Open To Load Image");
			this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseMove);
			this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
			// 
			// pictureBox2
			// 
			this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.pictureBox2.Cursor = System.Windows.Forms.Cursors.Cross;
			this.pictureBox2.Location = new System.Drawing.Point(424, 32);
			this.pictureBox2.Name = "pictureBox2";
			this.pictureBox2.Size = new System.Drawing.Size(128, 128);
			this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
			this.pictureBox2.TabIndex = 1;
			this.pictureBox2.TabStop = false;
			this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click);
			this.pictureBox2.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox2_MouseMove);
			this.pictureBox2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox2_MouseDown);
			// 
			// button1
			// 
			this.button1.Cursor = System.Windows.Forms.Cursors.Arrow;
			this.button1.Location = new System.Drawing.Point(448, 192);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(75, 32);
			this.button1.TabIndex = 1;
			this.button1.Text = "Block Details";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// button2
			// 
			this.button2.Location = new System.Drawing.Point(448, 344);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(75, 32);
			this.button2.TabIndex = 0;
			this.button2.Text = "Exit";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// textBox1
			// 
			this.textBox1.BackColor = System.Drawing.SystemColors.ScrollBar;
			this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
			this.textBox1.Cursor = System.Windows.Forms.Cursors.Arrow;
			this.textBox1.Location = new System.Drawing.Point(64, 392);
			this.textBox1.Name = "textBox1";
			this.textBox1.ReadOnly = true;
			this.textBox1.TabIndex = 2;
			this.textBox1.Text = "XBlock:";
			// 
			// textBox2
			// 
			this.textBox2.BackColor = System.Drawing.SystemColors.ScrollBar;
			this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.None;
			this.textBox2.Cursor = System.Windows.Forms.Cursors.Arrow;
			this.textBox2.Location = new System.Drawing.Point(176, 392);
			this.textBox2.Name = "textBox2";
			this.textBox2.ReadOnly = true;
			this.textBox2.TabIndex = 3;
			this.textBox2.Text = "YBlock:";
			// 
			// textBox3
			// 
			this.textBox3.BackColor = System.Drawing.SystemColors.ScrollBar;
			this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.None;
			this.textBox3.Cursor = System.Windows.Forms.Cursors.Arrow;
			this.textBox3.Location = new System.Drawing.Point(424, 168);
			this.textBox3.Name = "textBox3";
			this.textBox3.ReadOnly = true;
			this.textBox3.Size = new System.Drawing.Size(144, 13);
			this.textBox3.TabIndex = 4;
			this.textBox3.Text = "Pixel (R,G,B): ";
			this.textBox3.TextChanged += new System.EventHandler(this.textBox3_TextChanged);
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(16, 8);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(100, 16);
			this.label1.TabIndex = 5;
			this.label1.Text = "Loaded Image";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(424, 8);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(144, 16);
			this.label2.TabIndex = 6;
			this.label2.Text = "Zoom In";
			// 
			// UserControl1
			// 
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.label2,
																		  this.label1,
																		  this.textBox3,
																		  this.textBox2,
																		  this.textBox1,
																		  this.button2,
																		  this.button1,
																		  this.pictureBox2,
																		  this.pictureBox1});
			this.Name = "UserControl1";
			this.Size = new System.Drawing.Size(576, 432);
			this.Load += new System.EventHandler(this.UserControl1_Load);
			this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.UserControl1_MouseMove);
			this.ResumeLayout(false);

		}
		#endregion

		private void button1_Click(object sender, System.EventArgs e)
		{
			// Block details button
			PixelDisplayDialog dlg = new PixelDisplayDialog((Bitmap) pictureBox2.Image, mode);
			dlg.ShowDialog();	
		}

		private void button2_Click(object sender, System.EventArgs e)
		{
			Application.Exit();
		}

		private void UserControl1_Load(object sender, System.EventArgs e)
		{
			// On load, put a plain black bitmap in PictureBox2
			Bitmap img = new Bitmap(mode,mode);
			int i, j;
			for (i=0; i<mode; i++)
				for (j=0; j<mode; j++)
                    img.SetPixel(i,j,Color.Black);
			pictureBox2.Image = img;

			// On load, put a light gray bitmap in PictureBox2
			Bitmap img1 = new Bitmap(352,352);
			for (i=0; i<352; i++)
				for (j=0; j<352; j++)
					img1.SetPixel(i,j,Color.LightGray);
			pictureBox1.Image = img1;
		}

		public void LoadPictureBox1(string fileName)
		{
			Bitmap img = new Bitmap(fileName);
			ImageFunctions imgF = new ImageFunctions();
			imgF.setImage(img);

			toolTip1.SetToolTip(pictureBox1, "Click on a block to zoom in");
			toolTip2.SetToolTip(pictureBox2, "Display RGB values for pixel at cursor postion");
			toolTip3.SetToolTip(button1, "Display details of Zoom In image");

			FileInfo info = new FileInfo(fileName);
			inputFileLength = info.Length;

			//	In this section the loaded image is resized so that the height
			//	and width are multiples of 16.  That needs to be done because
			//	MPEG macroblocks are 16x16 pixels.
			Size imgSize = imgF.getBMPSize();
			int xFill = 0;
			int yFill = 0;
			int xRem, yRem;

			xRem = imgSize.Width%16;
			yRem = imgSize.Height%16;

			if (xRem != 0)
				xFill = 16-xRem;

			if (yRem != 0)
				yFill = 16-yRem;

			//	This is fills in the bitmap to an MPEG regulation size
			Bitmap img1 = new Bitmap(imgSize.Width+xFill, imgSize.Height+yFill);

			if ((xFill != 0) && (yFill == 0))
				imgF.padWidth(img1);
			else if ((xFill == 0) && (yFill != 0))
				imgF.padHeight(img1);
			else if ((xFill != 0) && (yFill != 0))
			{
				Bitmap img2 = new Bitmap(imgSize.Width+xFill, imgSize.Height);
				imgF.padWidth(img2);
				imgF.setImage(img2);
				imgF.padHeight(img1);
			}
			else
				img1 = img;

			//	Load the image into the picture box and if it's smaller than
			//	352x352 leave it alone.  If it is bigger than 352x352
			//	shrink it to fit the box.
			if (img1.Width <= 352 && img1.Height <= 352)
			{
				pictureBox1.Width = img1.Width;
				pictureBox1.Height = img1.Height;
				stretchX = stretchY = 1.0;
				pictureBox1.Image = img1;
			}
			else
			{
				pictureBox1.Width = 352;
				pictureBox1.Height = 352;
				pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
				stretchX = 352.0/img1.Width;
				stretchY = 352.0/img1.Height;
				pictureBox1.Image = img1;
			}
		}

		private void UserControl1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			this.Cursor = Cursors.Arrow;		
		}

		private void pictureBox1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			this.Cursor = Cursors.Hand;

			string s2, s3;

			xPos = ((int)(e.X / stretchX))/mode;
			s2 = "XBlock: " + xPos.ToString();
			textBox1.Text = s2;

			yPos = ((int)(e.Y / stretchY))/mode;
			s3 = "YBlock: " + yPos.ToString();
			textBox2.Text = s3;
		}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品高清| 国产精品久久久爽爽爽麻豆色哟哟| 激情图片小说一区| 国产精品成人在线观看| 欧美一二区视频| 97超碰欧美中文字幕| 日韩高清在线电影| 夜夜亚洲天天久久| 国产亚洲欧美日韩俺去了| 在线影视一区二区三区| 国产suv一区二区三区88区| 五月综合激情婷婷六月色窝| 国产精品女同一区二区三区| 一色屋精品亚洲香蕉网站| 精品捆绑美女sm三区| 欧美日韩一区高清| 欧美制服丝袜第一页| 成人aaaa免费全部观看| 国产高清成人在线| 国产美女精品一区二区三区| 久久av中文字幕片| 男人的天堂久久精品| 日本成人在线视频网站| 午夜精品福利视频网站| 亚洲国产日韩在线一区模特| ...av二区三区久久精品| 国产精品乱人伦中文| 欧美国产日本视频| 中文字幕免费不卡| 国产欧美一区二区三区在线老狼| 91精品国产综合久久精品麻豆| 欧美日韩色一区| 欧美日韩久久一区| 欧美日韩在线综合| 欧美精品一二三四| 正在播放亚洲一区| 91精品国产高清一区二区三区| 在线观看免费一区| 欧美日韩的一区二区| 欧美久久一区二区| 91精品国产欧美一区二区18| 正在播放一区二区| 正在播放亚洲一区| 日韩欧美久久久| 久久五月婷婷丁香社区| 国产日韩欧美a| 国产精品精品国产色婷婷| 亚洲男人天堂一区| 亚洲一区二区三区四区五区中文| 亚洲国产精品自拍| 男男gaygay亚洲| 激情成人综合网| 成人av片在线观看| 欧美亚洲动漫另类| 91精品国产综合久久蜜臀| 日韩三级电影网址| 中文字幕国产精品一区二区| ㊣最新国产の精品bt伙计久久| 亚洲免费视频中文字幕| 久久草av在线| 大胆欧美人体老妇| 欧美在线free| 精品国产一区二区精华| 久久久久久久综合| 亚洲国产高清aⅴ视频| 亚洲视频免费看| 日韩精品亚洲专区| 久久国产视频网| 99视频国产精品| 欧美一区二区在线免费播放| 久久精品视频免费观看| 亚洲永久免费av| 麻豆国产精品视频| 色偷偷成人一区二区三区91| 欧美一区二区三区色| 国产精品二三区| 亚洲色图在线播放| 麻豆久久久久久久| 一本大道av伊人久久综合| 日韩欧美成人午夜| 最新不卡av在线| 日本欧美久久久久免费播放网| 成人免费电影视频| 欧美性生活一区| 国产女主播视频一区二区| 亚洲午夜三级在线| 韩国精品免费视频| 在线免费亚洲电影| 国产视频911| 天堂成人国产精品一区| av激情亚洲男人天堂| 日韩欧美卡一卡二| 亚洲精品视频在线看| 国产一区二区三区高清播放| 欧美美女直播网站| 国产精品盗摄一区二区三区| 精品夜夜嗨av一区二区三区| 欧美午夜一区二区三区免费大片| 国产亚洲欧美一级| 理论片日本一区| 欧洲视频一区二区| 国产精品视频看| 99久久精品久久久久久清纯| 精品国产乱码久久久久久图片| 亚洲影院久久精品| 99久久精品费精品国产一区二区| 91精品国产全国免费观看| 一二三四社区欧美黄| jlzzjlzz欧美大全| www国产成人| 蓝色福利精品导航| 91精品国产综合久久福利软件| 一区二区三区视频在线观看| 高清在线观看日韩| 精品伦理精品一区| 日日摸夜夜添夜夜添国产精品| 99re热视频这里只精品| 国产精品久久久久一区二区三区| 精品一区二区三区影院在线午夜| 在线不卡中文字幕播放| 亚洲九九爱视频| k8久久久一区二区三区| 国产欧美日韩综合精品一区二区| 国产一区二区久久| 精品国产精品网麻豆系列 | 亚洲女性喷水在线观看一区| 九九精品一区二区| 日韩欧美视频一区| 狠狠色丁香久久婷婷综合丁香| 欧美一二三四在线| 久久国内精品视频| 精品国产一区a| 国产麻豆午夜三级精品| 日本一区二区三级电影在线观看 | 国产真实乱偷精品视频免| 精品久久久久99| 国产一区二区三区久久悠悠色av| 精品久久久三级丝袜| 国产经典欧美精品| 国产欧美视频在线观看| k8久久久一区二区三区| 亚洲伦在线观看| 欧美日韩一本到| 秋霞电影网一区二区| 久久一日本道色综合| 成人影视亚洲图片在线| 最新中文字幕一区二区三区 | 日本一区二区电影| 99riav久久精品riav| 亚洲色欲色欲www| 粉嫩欧美一区二区三区高清影视| 国产精品久久精品日日| 在线观看av一区二区| 日韩av在线播放中文字幕| 精品va天堂亚洲国产| 国产91丝袜在线播放| 亚洲精品自拍动漫在线| 555夜色666亚洲国产免| 国产一区视频网站| 亚洲男人的天堂在线aⅴ视频| 欧美色倩网站大全免费| 免费不卡在线视频| 国产视频一区在线播放| 一本久道中文字幕精品亚洲嫩| 亚洲精品伦理在线| 欧美大片在线观看一区| 国产乱子伦视频一区二区三区| 中文av字幕一区| 欧美亚洲国产一区二区三区| 国产曰批免费观看久久久| 国产日韩欧美精品电影三级在线| 99久久精品国产导航| 亚洲欧美激情小说另类| 欧洲av在线精品| 奇米精品一区二区三区四区| 国产精品久久久久久户外露出 | 色国产综合视频| 蜜臀精品一区二区三区在线观看| 国产人妖乱国产精品人妖| 欧美中文字幕一区| 韩国精品免费视频| 亚洲在线中文字幕| 久久综合久色欧美综合狠狠| 日本黄色一区二区| 麻豆精品一区二区av白丝在线| 久久综合狠狠综合久久激情 | 奇米亚洲午夜久久精品| 亚洲国产精品精华液2区45| 91麻豆精品国产91久久久| 成人免费精品视频| 一级精品视频在线观看宜春院| 欧美成人激情免费网| 欧美探花视频资源| 国产馆精品极品| 免费精品视频最新在线| 亚洲激情一二三区| 国产精品乱子久久久久| 日韩美女视频一区二区在线观看| 91视频国产观看| 日韩成人免费看|