Rank: Member
Groups: Member
Joined: 5/31/2006(UTC) Posts: 20
|
Hi Dmitry, i have to reroll the Thread.. I found out, that when i use 1 or 2 values like 10,0,0,0 (wich is 26,0,0,0 in Byte) or 20,70,0,0 (15,179,0,0 in Byte) the DLL translates it correctly. Photoshop shows 10,0,0,0 and 20,70,0,0. But when i use something like 5,5,90,0 (wich is 13,13,230,0) Photshop shows me 0,0,85,5!! It looks nearly like the one i wanted, but the Values are very different. Is this a bug? here is the Code: Code: string str = "Aurigma";
System.Drawing.SizeF size = System.Drawing.SizeF.Empty;
System.Drawing.Font font = new System.Drawing.Font("Arial", 14);
System.Drawing.SolidBrush brush = new System.Drawing.SolidBrush(Aurigma.GraphicsMill.CmykColor.FromCmyk(13, 13, 230, 0));
Aurigma.GraphicsMill.Bitmap bmp = new Aurigma.GraphicsMill.Bitmap(@"C:\Dokumente und Einstellungen\buettner\Desktop\Test Daten\CMYK_Black.jpg");
// Measure string.
Aurigma.GraphicsMill.Bitmap tempBmp = new Aurigma.GraphicsMill.Bitmap(100, 100,
Aurigma.GraphicsMill.PixelFormat.Format24bppRgb);
System.Drawing.Graphics gdipGraphics = tempBmp.GetGdiplusGraphics();
try{
size = gdipGraphics.MeasureString(str, font);
}
finally{
gdipGraphics.Dispose(); tempBmp.Dispose();
}
// Create temporary bitmap 32bpp ARGB bitmap and draw string on it.
Aurigma.GraphicsMill.Bitmap textBitmap = new Aurigma.GraphicsMill.Bitmap(System.Convert.ToInt32(size.Width),
System.Convert.ToInt32(size.Height), Aurigma.GraphicsMill.PixelFormat.Format32bppArgb);
System.Drawing.Bitmap gdipBitmap = textBitmap.ToGdiplusBitmapDirectly();
gdipGraphics = System.Drawing.Graphics.FromImage(gdipBitmap);
try{
gdipGraphics.DrawString(str, font, brush, 0, 0);
}
finally{
gdipGraphics.Dispose();
gdipBitmap.Dispose();}
// Convert temporary bitmap with string to CMYK pixel format and draw it on destination bitmap.
textBitmap.ColorManagement.ConvertToContinuous(Aurigma.GraphicsMill.ColorSpace.Cmyk,
textBitmap.HasAlpha, textBitmap.IsExtended);textBitmap.Draw(bmp, 20, 20, textBitmap.Width,
textBitmap.Height, Aurigma.GraphicsMill.Transforms.CombineMode.Alpha,
1.0f, Aurigma.GraphicsMill.Transforms.InterpolationMode.LowQuality);
bmp.Save(@"C:\Dokumente und Einstellungen\buettner\Desktop\Test Daten\CMYK_WithTiff.tif");
regards Christian Edited by user Tuesday, December 18, 2007 4:52:55 PM(UTC)
| Reason: Not specified
|