32 bit depth image

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2005
Posts: 14
Reputation: manar is an unknown quantity at this point 
Solved Threads: 0
manar manar is offline Offline
Newbie Poster

32 bit depth image

 
0
  #1
Apr 7th, 2006
hi
i finished writing c# algorithm that is applied on a '24 bit depth' bitmap image that i called from file, and it was success; but when i apply the algorithm on a 32 bit depth image a break while running occur which is : " Value does not fall within the expected range".

what i have to do in order to apply my code on this type of image "32bit".
i think i have to do something after the 'image.fromfile', to make it acceptable by the rest of the code.
plz reply me your suggestion!
Manar
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 14
Reputation: manar is an unknown quantity at this point 
Solved Threads: 0
manar manar is offline Offline
Newbie Poster

Re: 32 bit depth image

 
0
  #2
Apr 7th, 2006
note:
when i add the bold statement, the result shown is a black image!, what i have to do??

private void button2_Click(object sender, System.EventArgs e)
{

Image b = Image.FromFile(@"C:\project\test1.bmp" );

Bitmap source =(Bitmap)b;
source = new Bitmap(320, 240, System.Drawing.Imaging.PixelFormat.Format24bppRgb); Gray(source);
SobelEdgeDetector s= new SobelEdgeDetector();
Bitmap k = s.Apply(source);
g.DrawImage(k,5 ,5 );
k.Save(@"C:\project\rr.bmp");
}
Manar
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 14
Reputation: manar is an unknown quantity at this point 
Solved Threads: 0
manar manar is offline Offline
Newbie Poster

Re: 32 bit depth image

 
0
  #3
Apr 8th, 2006
re hi
any suggestion to convert the bitmap from 32 bit depth pixel to 24 bit (removing alpha)??
reply if you have an idea :o
Manar
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 5247 | Replies: 2
Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC