PDA

View Full Version : Save Image with OverlayBitmap



pixon
October 12, 2004, 09:19:14
Hello,

How can I save Image with OverlayBitmap to jpeg? In previous version was there a method MemoryGetDib() and then DIBtoJPEG function from your jpeg.dll library. In current version I can't find any method to do this. MemorySaveImage() save into (raw) bmp format and method ImageBuffer.SaveAsJpeg() save just image frame without OverlayBitmap.

Thnx
Peter

Stefan Geissler
October 12, 2004, 10:03:48
Hello,

Please use following code (it is c#, but similar in vb.net):



private void Form1_Load(object sender, System.EventArgs e)
{
TIS.Imaging.OverlayBitmap ob;
icImagingControl1.ShowDeviceSettingsDialog();

if( icImagingControl1.DeviceValid )
{
ob = icImagingControl1.OverlayBitmap;
ob.Enable = true;
ob.Fill( ob.DropOutColor );

ob.FontTransparent = true;
ob.DrawText( Color.FromArgb(255, 0, 0), 10, 10, "Some text.");
icImagingControl1.LiveStart();

icImagingControl1.MemorySnapImage();
icImagingControl1.ImageActiveBuffer.SaveAsJpeg("c:\\puffer\\test.jpg",90);
}
}



If this not works, please tell me in detail, what you are doing.