

ImageViewer supports the following features LEADTOOLS Document Viewer uses an Image Viewer instance in vertical layout to view thumbnails of pagesĪnd another Image Viewer instance with in double layout to view the main content

StrStatus=strStatus +" around " + strFlip + " axis.LEADTOOLS Main Demo uses an Image Viewer instance in single layout mode to view the main image StrStatus=strStatus + strRot + " degrees" StrStatus="Stretch mode - Image is stretched or shrunk to fit the Picture Box." PbxImg.SizeMode=PictureBoxSizeMode.StretchImage StrStatus="Normal mode - Image is clipped if it is bigger than the Picture Box." PbxImg.SizeMode=PictureBoxSizeMode.Normal StrStatus=strStatus + "If the image is big then outside edges of Image is clipped." StrStatus="CenterImage mode - Image is placed in the center of the Picture Box." PbxImg.SizeMode=PictureBoxSizeMode.CenterImage StrStatus="AutoSize mode - The PictureBox is sized equal to the size of the image PbxImg.SizeMode=PictureBoxSizeMode.AutoSize Private void fncPicMode( object obj,EventArgs ea) (RotateFlipType.RotateNoneFlipXY) Įlse if (btnTemp.Text="Original Position") Private void fncTransform( object obj,EventArgs ea) Private void fncFlip( object obj,EventArgs ea) Private void fncRot( object obj,EventArgs ea) If (dlgSave.ShowDialog()=DialogResult.OK) SaveFileDialog dlgSave = new SaveFileDialog() ĭlgSave.Filter="JPEG Images (*.jpg,*.jpeg)|*.jpg *.jpeg|Gif Images (*.gif)*.gif|Bitmaps (*.bmp)|*.bmp" * save the image in the required format. Private void fncSave( object sender, EventArgs ea) RbnFlip270.Click+= new EventHandler(fncFlip) ītnTransform.Click+= new EventHandler(fncTransform) ītnOrg.Click += new EventHandler(fncTransform) ĬmbPicMode.SelectionChangeCommitted += new EventHandler(fncPicMode) RbnFlip180.Click+= new EventHandler(fncFlip) RbnFlip90.Click+= new EventHandler(fncFlip) RbnFlipNone.Click+= new EventHandler(fncFlip) RbnRotXY.Click+= new EventHandler(fncRot) RbnRotY.Click+= new EventHandler(fncRot) RbnRotX.Click+= new EventHandler(fncRot) RbnRotNone.Click+= new EventHandler(fncRot) * if the picture is loaded then enable the events. If (dlgFile.ShowDialog()= DialogResult.OK) Private void fncOpen( object obj,EventArgs ea)ĭlgFile.Filter="JPEG Images (*.jpg,*.jpeg)|*.jpg *.jpeg|Gif Images (*.gif)*.gif|Bitmaps (*.bmp)|*.bmp" Private RadioButton fncRadBtns( string strText, string strName, int intWidth, int intX, int intY) StbBtm.Text = "Normal mode - Image is clipped if it is bigger than the Picture Box." RbnFlip270 = fncRadBtns("XY - axis","XY",70,220,20) rbnRotNone.Checked = true ĬmbPicMode.DropDownStyle=ComboBoxStyle.DropDownList * initialize and add the controls to the form. MnuExit.Click+= new EventHandler(fncExit) MnuSave.Click+= new EventHandler(fncSave) MnuOpen.Click+= new EventHandler(fncOpen) RadioButton bnRotNone,rbnRotX,rbnRotY,rbnRotXY,rbnFlipNone,rbnFlip90,rbnFlip180,rbnFlip270,rbnTemp Ĭonsole.WriteLine("error . String strImgName,strRot,strFlip,strRotFlip,strStatus MenuItem mnuFile, mnuOpen, mnuSave, mnuExit, mnuSep
#JAVA OPEN BITMAP IN IMAGEVIEWER CODE#
Replace all code from Form1.cs accept namespace includes.
#JAVA OPEN BITMAP IN IMAGEVIEWER WINDOWS#
To compile and execute code with VS.NET, create a Windows application and copy and paste this code in Form1.cs class. This example uses menus, radio buttons, group boxes, open and save dialog boxes, picture box and status bar controls. Program also provides options to stretch and shrink them, rotate at different angles through all axes and save them in different formats. This program allows you to open and view image files including JPEG, GIF, WMF and other images.
