AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

little bug with reload method

Forum to discuss Image Processing Lab (IPLab) application, its features, etc.

little bug with reload method

Postby Alex » Sat Dec 12, 2009 3:26 am

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.
Alex
 
Posts: 7
Joined: Tue Oct 27, 2009 7:03 am
Location: China

Re: little bug with reload method

Postby andrew.kirillov » Sat Dec 12, 2009 4:24 pm

Hello,

Thank you for the hint. Will be fixed.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3414
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: little bug with reload method

Postby khushbu.badheka » Wed May 22, 2013 10:07 am

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?
khushbu.badheka
 
Posts: 1
Joined: Wed May 22, 2013 9:17 am




Return to IPLab

cron