T
Tamir Khason
I have huge bitmap inmemory (about 4K x 6K 300dpi) and I want to quick
resize it so old fasion way:
Bitmap result = new Bitmap( nSize.Width, nSize.Height);
using(
Graphics g1 = Graphics.FromImage( (Image) result ) )
{
g1.DrawImage( b, 0, 0, nSize.Width, nSize.Height );
}
working rather fine the first (and even second time), but each time it used
the process takes x2 time (no difference between make the bitmap bigger or
smaller)
so the fifth time application crashed with no memory
Anyone can advice WHY and maybe better way to do this. I have concurrent one
image in application.
I do not want to go unmanaged this time.
thx
resize it so old fasion way:
Bitmap result = new Bitmap( nSize.Width, nSize.Height);
using(
Graphics g1 = Graphics.FromImage( (Image) result ) )
{
g1.DrawImage( b, 0, 0, nSize.Width, nSize.Height );
}
working rather fine the first (and even second time), but each time it used
the process takes x2 time (no difference between make the bitmap bigger or
smaller)
so the fifth time application crashed with no memory
Anyone can advice WHY and maybe better way to do this. I have concurrent one
image in application.
I do not want to go unmanaged this time.
thx