You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. instantiate KalikoImage by passing TIFF file name
What is the expected output? What do you see instead?
Expected: image is instantiated properly
Actual: OutOfMemoryException is thrown
What version of the product are you using? On what operating system?
1.2.4.0 (Win7)
Please provide any additional information below.
This happens for some TIFF images (especially when they are about 1500x1500).
What we have noticed it is related to some kind of unsupported format of image.
There is also a workaround for it. If conversion used in MakeImageNonIndexed()
method is always executed, file is loaded properly:
private void MakeImageNonIndexed()
{
//if(IndexedPalette)
_image = new Bitmap(new Bitmap(_image));
}
You can contact me at wojciech.kotlarski at 7digital.com in order to get
example tiff file that is causing problems (I cannot upload this image with
this ticket, as it should not be publicly available)
Original issue reported on code.google.com by [email protected] on 25 Feb 2013 at 2:51
The text was updated successfully, but these errors were encountered:
Hello,
There is a working code for us (change is applied to KalikoImage.cs):
public void LoadImage(string fileName)
{
_image = ConvertImage(Image.FromFile(fileName));
_g = Graphics.FromImage(_image);
}
public void LoadImage(Stream stream)
{
_image = ConvertImage(Image.FromStream(stream));
_g = Graphics.FromImage(_image);
}
/// <summary>
/// Convert image to truecolor
/// </summary>
private Image ConvertImage(Image image)
{
using (image)
using (Bitmap bitmap = new Bitmap(image))
return new Bitmap(bitmap);
}
Original issue reported on code.google.com by
[email protected]
on 25 Feb 2013 at 2:51The text was updated successfully, but these errors were encountered: