0

I'm reopening a C# project I had given up on. I am trying to parse through a bitmap image to find a specific range of HSL values. If the bits I'm 'looking' at fall within that HSL range, I keep them. If they don't, I would throw them away.

I have no problem converting the bitmap into an array of raw bits, but I don't know what to do with them from there! Or if there is a better way, I don't know that either.

I have little experience in working with images, and I'm still trying to learn, so please keep that in mind in a response. I am working in C#, VS 2013.

EDIT: The problem is, essentially, I don't know how to evaluate the color data within the image. All I am doing is allowing the program user to upload an image, then casting it as a bitmap, like so:

open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
if (open.ShowDialog() == DialogResult.OK) {
  // display image in picture box
  Bitmap LoadedImage = new Bitmap(open.FileName);
  imgPicture.Image = LoadedImage;
}

The image I'm using to practice with is a jpg, but the program would support multiple file types.

Sean
  • 95
  • 3
  • 11
  • What is the color format of your image? Is it RGB or something else? How are pixels arranged in your bitmap image? Is your issue trying to convert from RGB to HSL? – Peter O. Sep 30 '14 at 07:58
  • Yeah, this is one of those "little experience in working with images" issues; I don't actually know what the color format is. Perhaps that is my issue; I don't know how to access that information. I am updating the question with a little more detail. – Sean Oct 01 '14 at 13:16

0 Answers0