Page 1 of 1

little bug with reload method

PostPosted: Sat Dec 12, 2009 3:26 am
by Alex
When opening a image,the programm will do the format conversion like this:

Code: Select all
      // format image
                if ( !AForge.Imaging.Image.IsGrayscale( image ) && ( image.PixelFormat != PixelFormat.Format24bppRgb ) )
                {
                    Bitmap temp = AForge.Imaging.Image.Clone( image, PixelFormat.Format24bppRgb );
                    image.Dispose( );
                    image = temp;
                }


But after reloading this image , this conversion is not implemented.
So when I open a 32bppRGB image,and the statusBar will not display some information of pixels.

Re: little bug with reload method

PostPosted: Sat Dec 12, 2009 4:24 pm
by andrew.kirillov
Hello,

Thank you for the hint. Will be fixed.

Re: little bug with reload method

PostPosted: Wed May 22, 2013 10:07 am
by khushbu.badheka
I have also the same problem with this Image formatting.
if (!AForge.Imaging.Image.IsGrayscale(image) && (image.PixelFormat != System.Drawing.Imaging.PixelFormat.Format24bppRgb))
{
System.Drawing.Bitmap temp = AForge.Imaging.Image.Clone(image, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
image.Dispose();
image = temp;
}
return image;

This image doesn't contain my texts but if I updated it like :
if (!AForge.Imaging.Image.IsGrayscale(image) && (image.PixelFormat != System.Drawing.Imaging.PixelFormat.Format24bppRgb))
{
System.Drawing.Bitmap temp = AForge.Imaging.Image.Clone(image, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
// image.Dispose();
image = temp;
}
return image;
In this case my all the texts are shown but its forecolor is gray or black with lowest opacity.
So I want solution to come out of this. Is it possible or not?