Hi,
i tried to paint a text on a CMYK Tiff Image like this:
Leadtools.WinForms.RasterImageViewer riv = new Leadtools.WinForms.RasterImageViewer();
RasterCodecs.CodecsPath = @"C:\leadtool\Bin\Dotnet\v20";
// Intitialize the RasterCodecs object.
RasterCodecs codecs = new RasterCodecs();
// Load the CMYK planes
IRasterImage image = codecs.LoadCmykPlanes( "1.tif", 0, 1 );
// the image passed to this function should contain 4 pages, one for each of the CMYK planes
RasterPaintProperties properties = new RasterPaintProperties();
properties.RasterOperation = RasterPaintProperties.SourceCopy;
Rectangle src = new Rectangle( 0, 0, image.Width, image.Height );
Rectangle dest = new Rectangle( 0, 0, Convert.ToInt32( image.Width / 2 ), Convert.ToInt32( image.Height / 2 ) );
Graphics g = riv.CreateGraphics();
image.PaintCmykPlanes( g, src, dest, properties, null );
Color customColor = Color.Black;
SolidBrush sb = new SolidBrush(customColor);
g.DrawString( "HUHUHU", new Font( "Arial", 20 ), sb, new PointF( 100, 100 ) );
g.Dispose();
// Save the plans as a CMYK TIFF file.
codecs.SaveCmykPlanes( image, "test.tif", RasterImageFormat.TifCmyk, 0, 0, CodecsSavePageMode.Overwrite );
image.Dispose();
Unfortunatly nothing happens with the picture. What do i wrong?
regards
Christian