I am using the code below to use DispalyTE 35 to show the image captured by SerialCameraL1. I copied the code from the Forum topic:Troubles with Serial Cam L1, T43 Module.
using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Presentation.Shapes;
using Microsoft.SPOT.Touch;
using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;
namespace GadgeteerserialCameraL1
{
public partial class Program
{
Bitmap bmap;
// This method is run when the mainboard is powered up or reset.
void ProgramStarted()
{
bmap = new Bitmap(displayTE35.Width, displayTE35.Height);
new Thread(VideoStreaming).Start();
// Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
Debug.Print("Program Started");
}
void VideoStreaming()
{
serialCameraL1.StartStreaming();
Debug.Print("streaming started");
while(true)
{
Thread.Sleep(500);
if (serialCameraL1.NewImageReady)
{
Debug.Print("new image ready");
var image = serialCameraL1.GetImage();
bmap.DrawImage(0, 0, image, 0, 0, displayTE35.Width, displayTE35.Height);
bmap.Flush();
serialCameraL1.StopStreaming();
}
}
}
}
}
It works fine when I first debug it, Display TE35 shows the full screen image, but after I tried to save the image into the sdCard unsuccessfully,
I tried to run the codes again for just displaying the image, Display TE35 never gives me full screen image. It only shows the image in the quarter of the screen. Does any one can help me, what happened?
Many thanks.