this is a really simple question about how I can save images with new names when using the AXIS SDK.
As you can see under the AMC.SaveCurrentImage it works and it saves the image in C:axis. The problem is that it creates the same name everytime, so the picture gets overwritten.
Is it a simple way to fix this. Also I though about saving it to the desktop instead of saving it to the C: because I need to create a folder for it.
Maybe this code cold help?
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); You can download the SDK from here: http://www.axis.com/my/en/support/developer-support/windows-development Would greatly appreciate feedback, this is my first post here.
This is my code to now.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace AXISViewer
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void playVideo_Click(object sender, EventArgs e)
{
AMC.MediaURL = "http://here.goes.the.ip.address/axis-cgi/mjpg/video.cgi";
AMC.MediaType = "mpjg";
AMC.MediaUseame = "root";
AMC.MediaPassword = "heregoesthepassword";
AMC.Play();
}
private void stopVideo_Click(object sender, EventArgs e)
{
AMC.Stop();
}
private void saveJPEG_Click(object sender, EventArgs e)
{
// string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
AMC.SaveCurrentImage(0, "C:\Axis\axis.jpg");
}
private void AMC_OnError(object sender, AxAXISMEDIACONTROLLib._IAxisMediaControlEvents_OnErrorEvent e)
{
MessageBox.Show(e.theErrorInfo);
}
}
}
