07-01-2009, 8:11
|
martin.pastor
Joined on 11-25-2008
Posts 29
|
how to display straight lines
|
 
 
|
|
|
Dear Friends,
I am using Leadtools v16.0 and MS Visual Studio 2005 in order to load and display an image. When the image is displayed, I want to plot some straight lines on it. According to the examples, I am using
“ri = codecs.Load(path);
RasterImageViewer riv = new RasterImageViewer();
riv.Image = new RasterImage(ri);
using (RasterImageGdiPlusGraphicsContainer container = riv.Image.CreateGdiPlusGraphics())
{using (Pen pen = new Pen(Color.FromArgb(alpha, Color.Red), w))
{
Point p1 = new Point(x1, y1);
Point p2 = new Point(x2, y2);
container.Graphics.DrawLine(pen, pp1, pp2);
}
}”
The main problem occurs because of the displayed images are in 8-bits gray scale and are about 200 Mpx. When the images are turn into a GDI, it changes from 8-bits to 32-bits, I computer has enough memory.
My question is, is there another way to plot a line on image?
Thanks in advanced,
Martín
|
|
|
|
|
Report
|
|
|
|