Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Image (Bitmap) Brightness/Contrast

Image (Bitmap) Brightness/Contrast

Scheduled Pinned Locked Moved C#
adobeperformancehelpgraphicstutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lexx_zone
    wrote on last edited by
    #1

    Hi guys! I have an image that I need to process. Actually I want to change brightness and contrast level. I tried to use a lot of algorithms and filters for processing such as AForge.Imaging.Filters, Color Matrix and many many others but no one can't provide a high processing performance. The main idea - to make a program which will allow to change brightness and contrast of the image in realtime by using TrackBar component like it realized in Adobe photoshop or in Windows Vista Photo Gallery in Photo Editing mode. The main problem - processing performance. For small size images Aforge filters works perfectly, but if I try to process the image which has been made by the 9.0Mpx digital camera, with resolution 3712x2088 it becomes a really big problem. Aforge brightness filter works too slow for big bitmaps. If anybody know how to resolve this problem, please help. I wish to know how brightness correction works in Vista Photo gallery... It can change brightness for any image with any size in realtime with incredible speed even if you will shake trackbar pointer side by side. How did they realized it??

    V L L 3 Replies Last reply
    0
    • L lexx_zone

      Hi guys! I have an image that I need to process. Actually I want to change brightness and contrast level. I tried to use a lot of algorithms and filters for processing such as AForge.Imaging.Filters, Color Matrix and many many others but no one can't provide a high processing performance. The main idea - to make a program which will allow to change brightness and contrast of the image in realtime by using TrackBar component like it realized in Adobe photoshop or in Windows Vista Photo Gallery in Photo Editing mode. The main problem - processing performance. For small size images Aforge filters works perfectly, but if I try to process the image which has been made by the 9.0Mpx digital camera, with resolution 3712x2088 it becomes a really big problem. Aforge brightness filter works too slow for big bitmaps. If anybody know how to resolve this problem, please help. I wish to know how brightness correction works in Vista Photo gallery... It can change brightness for any image with any size in realtime with incredible speed even if you will shake trackbar pointer side by side. How did they realized it??

      V Offline
      V Offline
      vineas
      wrote on last edited by
      #2

      I've dealt with this issue before by using separate bitmaps. You have one smaller bitmap for display, and your full bitmap is being adjusted in a background thread. When the slider is moved, you only adjust the display bitmap, and queue up the change for the full bitmap. Once the user clicks OK on the dialog (or is idle for a long enough period), then you do the operation on the full bitmap using the final value. I'm not sure if this will work for you or not, as it really depends on the app. Also, this type of bitmap operation is trivial to multithread. There are probably some codeproject articles talking about this.

      ----- In the land of the blind, the one eyed man is king.

      1 Reply Last reply
      0
      • L lexx_zone

        Hi guys! I have an image that I need to process. Actually I want to change brightness and contrast level. I tried to use a lot of algorithms and filters for processing such as AForge.Imaging.Filters, Color Matrix and many many others but no one can't provide a high processing performance. The main idea - to make a program which will allow to change brightness and contrast of the image in realtime by using TrackBar component like it realized in Adobe photoshop or in Windows Vista Photo Gallery in Photo Editing mode. The main problem - processing performance. For small size images Aforge filters works perfectly, but if I try to process the image which has been made by the 9.0Mpx digital camera, with resolution 3712x2088 it becomes a really big problem. Aforge brightness filter works too slow for big bitmaps. If anybody know how to resolve this problem, please help. I wish to know how brightness correction works in Vista Photo gallery... It can change brightness for any image with any size in realtime with incredible speed even if you will shake trackbar pointer side by side. How did they realized it??

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Hi, if you want to see the result while changing some parameters (e.g. by sliding a scrollbar), this would be my approach: 1. create a new image with the exact resolution you are using to currently display it; I assume that would be much smaller than your original image. Possibly even use half that size, and display it at 1/1 or 2/1 scale. 2. apply the algorithms of interest to that image, while changing the parameters; 3. when you are done setting the parameters, apply them to the original image (at full size). :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


        1 Reply Last reply
        0
        • L lexx_zone

          Hi guys! I have an image that I need to process. Actually I want to change brightness and contrast level. I tried to use a lot of algorithms and filters for processing such as AForge.Imaging.Filters, Color Matrix and many many others but no one can't provide a high processing performance. The main idea - to make a program which will allow to change brightness and contrast of the image in realtime by using TrackBar component like it realized in Adobe photoshop or in Windows Vista Photo Gallery in Photo Editing mode. The main problem - processing performance. For small size images Aforge filters works perfectly, but if I try to process the image which has been made by the 9.0Mpx digital camera, with resolution 3712x2088 it becomes a really big problem. Aforge brightness filter works too slow for big bitmaps. If anybody know how to resolve this problem, please help. I wish to know how brightness correction works in Vista Photo gallery... It can change brightness for any image with any size in realtime with incredible speed even if you will shake trackbar pointer side by side. How did they realized it??

          L Offline
          L Offline
          lexx_zone
          wrote on last edited by
          #4

          Guys, I thought about your decisions already to use thumbnails instead of main image. I actually tried to work with small images, but the size of image at which i got accepting filter performance was too small. I have to use an image cropping tool too and that is the main cause why I don't want to use small images. Maybe somebody knows some third party filters with good performance or how this functions realized in Photoshop or Vista? I really don't know how to use exposure features for large images. Maybe it can be possible to involve some graphic card possibility or something else...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups