C# Windows Mobile Development

how to write code for save bitmap images using C# Windows Mobile Devel

Page 1 of 1

4 Replies - 4888 Views - Last Post: 21 October 2009 - 01:58 AM Rate Topic: -----

#1 sripal51  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 18-October 09

C# Windows Mobile Development

Post icon  Posted 18 October 2009 - 10:22 PM

hai guys

pls help me iam a beginer to C# Windows Mobile developement



[quote]
Is This A Good Question/Topic? 0
  • +

Replies To: C# Windows Mobile Development

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Re: C# Windows Mobile Development

Posted 19 October 2009 - 06:18 AM

so is there a question somewhere? Try putting your question in the body of the post and not the description.
Was This Post Helpful? 0
  • +
  • -

#3 Ikonmx  Icon User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 45
  • Joined: 19-August 09

Re: C# Windows Mobile Development

Posted 19 October 2009 - 12:00 PM

Here is a small snippet for saving images. I recommend you to look at msdn for more options.
 private void Save(string path,Bitmap b)
		{
			string storePath = AppPath + "\\" + STR_FOTOS + "\\" + STR_FIRMA;
			b.Save(storePath, System.Drawing.Imaging.ImageFormat.Jpeg);
		}
 

This post has been edited by Ikonmx: 19 October 2009 - 12:01 PM

Was This Post Helpful? 1
  • +
  • -

#4 sripal51  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 18-October 09

Re: C# Windows Mobile Development

Posted 20 October 2009 - 02:10 AM

hai eclipsed4utoo

thank u for u r response.

i wrote my code below that is for capturing documentimaging.

in this code Iam going to capture Document Image in
void DocCap_Capture(object sender, DocumentCaptureEventArgs DocCaptureEventArgs) Event

so in this image is going save Default Location

But As per Requirement WE want to SAVE That Image in different Locations so for that Pupose
how can i write that code


void DocCap_Capture(object sender, DocumentCaptureEventArgs DocCaptureEventArgs)
{
try
{
if (DocCaptureEventArgs.DocCapInProcess)
{
this.statusBar1.Text = "DocCap in process, please wait...";
}

//display captured doucment image file
if (DocCaptureEventArgs.DocCapFile.Length > 0)
{
string filePath = DocCaptureEventArgs.DocCapFile.ToString();

this.statusBar1.Text = "File Path: " + filePath;



if (File.Exists(filePath))
{
if (myImager != null)
myImager.Dispose();

myImager = new Bitmap(filePath);
this.pictureBox1.Image = (Image)myImager;
}
}
}
catch (Exception exp)
{
MessageBox.Show(exp.Message);
}

}
Was This Post Helpful? 0
  • +
  • -

#5 sripal51  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 18-October 09

Re: C# Windows Mobile Development

Posted 21 October 2009 - 01:58 AM

[/quote]


 public partial class Form1 : Form
	{
		//declear doucment capture object 
		private Intermec.DataCollection.DocumentCapture DocCap;
		//declare bitmap object
		private Bitmap myImager;
		//private string Comments = string.Empty; 

		public Form1()
		{
			InitializeComponent();

			//try
			//{
				DocCap = new DocumentCapture();

				//use document capture events
		   
				this.DocCap.Capture += new DocumentCaptureEventHandler(DocCap_Capture);
}



void DocCap_Capture(object sender, DocumentCaptureEventArgs DocCaptureEventArgs)
{
try
{
if (DocCaptureEventArgs.DocCapInProcess)
{
this.statusBar1.Text = "DocCap in process, please wait...";
}

//display captured doucment image file
if (DocCaptureEventArgs.DocCapFile.Length > 0)
{
string filePath = DocCaptureEventArgs.DocCapFile.ToString();

this.statusBar1.Text = "File Path: " + filePath;

//here i want to write ImageSave code 

if (File.Exists(filePath))
{
if (myImager != null)
myImager.Dispose();

myImager = new Bitmap(filePath);
this.pictureBox1.Image = (Image)myImager;
}
}
}
catch (Exception exp)
{
MessageBox.Show(exp.Message);
}

}

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1