Loose Cannon#1740
I just started using Graphics Mill. Everything I've done thus far has been very straightforward with one exception.
The following line executes quickly. The image is a 2550x3300 pixel 24-bit TIFF file.
Aurigma.GraphicsMill.Bitmap bitmap=new Aurigma.GraphicsMill.Bitmap(filename);
The following line executes very slowly. It's basically just creating a duplicate Bitmap (without the image data) with the same size and pixel format as 'bitmap'.
Aurigma.GraphicsMill.Bitmap bitmapFinal=new Aurigma.GraphicsMill.Bitmap(Aurigma.GraphicsMill.RgbColor.White,bitmap.Width,bitmap.Height,Aurigma.GraphicsMill.PixelFormat.Format24bppRgb);
Any idea why the above line would execute so slowly? I have tried several variations but it's only when I specify the color that it runs so slowly. For example...
The following line executes quickly. The only difference is that I didn't specify a default color.
Aurigma.GraphicsMill.Bitmap bitmapFinal=new Aurigma.GraphicsMill.Bitmap(bitmap.Width,bitmap.Height,bitmap.PixelFormat);
I've also tried drawing 'bitmap' into 'bitmapFinal' with a copy operation. That executed quickly (which indicates that memory bandwidth isn't the problem.)
Lastly, I have tried simply creating the Bitmap without specifying the color and then performing a Bitmap::Clear() on it (to specify the fill color that I would have denoted in the constructor.) In that case the Clear() function executes very slowly.
Any ideas?
- LC
The following line executes quickly. The image is a 2550x3300 pixel 24-bit TIFF file.
Aurigma.GraphicsMill.Bitmap bitmap=new Aurigma.GraphicsMill.Bitmap(filename);
The following line executes very slowly. It's basically just creating a duplicate Bitmap (without the image data) with the same size and pixel format as 'bitmap'.
Aurigma.GraphicsMill.Bitmap bitmapFinal=new Aurigma.GraphicsMill.Bitmap(Aurigma.GraphicsMill.RgbColor.White,bitmap.Width,bitmap.Height,Aurigma.GraphicsMill.PixelFormat.Format24bppRgb);
Any idea why the above line would execute so slowly? I have tried several variations but it's only when I specify the color that it runs so slowly. For example...
The following line executes quickly. The only difference is that I didn't specify a default color.
Aurigma.GraphicsMill.Bitmap bitmapFinal=new Aurigma.GraphicsMill.Bitmap(bitmap.Width,bitmap.Height,bitmap.PixelFormat);
I've also tried drawing 'bitmap' into 'bitmapFinal' with a copy operation. That executed quickly (which indicates that memory bandwidth isn't the problem.)
Lastly, I have tried simply creating the Bitmap without specifying the color and then performing a Bitmap::Clear() on it (to specify the fill color that I would have denoted in the constructor.) In that case the Clear() function executes very slowly.
Any ideas?
- LC