Page 2 of 2
Tahoma Italic Text problem
Posted: Thu Apr 07, 2011 5:59 am
by Ivan
Hello,
We couldn't reproduce this bug.
In version 2011.1 in the ImageToBytes(Image image) method the try..catch operators are added, and exception should not occur there.
Please try to uninstall our product, find and remove all assemblies, clear GAC, and install our product again.
If the issue is still present, please send us a sample report with data or a simple test project, which reproduces the issue.
Thank you.
Tahoma Italic Text problem
Posted: Mon Apr 11, 2011 4:23 am
by luczan
Hello
i'm sorry, but report-rendering is a part of great application and it's impossible to send it.
But i added directly two projects (Stimulsoft.Base and Stimulsoft.Report) to my application to debug this problem. Exception occured when method ImageToString called method ImageToBytes (no in the code of ImageToBytes).
When i updated code of method ImageToString, report is rendered and no exception is occured.
public static string ImageToString(Image image)
{
if (image == null)return string.Empty;
//*************
byte[] bytes = new byte[0];
TypeConverter imageConverter = TypeDescriptor.GetConverter(typeof(Image));
try
{
bytes = (byte[])imageConverter.ConvertTo(image, typeof(byte[]));
}
catch
{
try
{
using (Bitmap bmp = new Bitmap(image.Width, image.Height, image.PixelFormat))
{
Graphics gr = Graphics.FromImage(bmp);
gr.DrawImage(image, 0, 0, image.Width, image.Height);
gr.Dispose();
bytes = (byte[])imageConverter.ConvertTo(bmp, typeof(byte[]));
}
}
catch
{
}
}
return Convert.ToBase64String(bytes);
//************
//byte [] bytes = ImageToBytes(image);
//return Convert.ToBase64String(bytes);
}
Tahoma Italic Text problem
Posted: Mon Apr 11, 2011 7:10 am
by Ivan
Hello,
We made this improvements in our code.
Please check the next prerelease build from 12-Apr-2011 when it will be available and let us know about the result.
Thank you.
Tahoma Italic Text problem
Posted: Thu Apr 14, 2011 5:08 am
by luczan
everything is ok with the last version from 12-apr-2011 , no exception is occured
thank you
Marek
Tahoma Italic Text problem
Posted: Thu Apr 14, 2011 6:07 am
by Alex K.
Hello Marek,
Let us know if you need any additional help.
Thank you.