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 dislaying and processing in C#

Image dislaying and processing in C#

Scheduled Pinned Locked Moved C#
graphicscsharpwinformsgame-devperformance
5 Posts 4 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.
  • S Offline
    S Offline
    silka_c
    wrote on last edited by
    #1

    I'm working on an application in C#, which has the capabilities of displaying and processing images. (one at a time, the images are rather large but I finally decided on resizing them to moderate sizes (e.g. 600*600)) ;) There's not much image processing involved but zoom, mirroring, rotation and brightness change should be possible. The most important fact is performance. The image should be displayed very fast and the image processing steps sould be very fast too. I'm trying to brainstorm some new ideas of doing the displaying and image processing because I tried so many things but I'm not satisfied with the results. I tried it with GDI+ (with and without brushes) and with Managed DirectX (Direct3D and also DirectDraw). Anyone here has good ideas of doing it? Am I on the right path or did I miss a possibility? :confused: Right now I tend to do it with GDI+ because DirectX does not really work faster and is more complicated to use. :) thank you very much. -- modified at 10:22 Tuesday 30th August, 2005

    A J H 3 Replies Last reply
    0
    • S silka_c

      I'm working on an application in C#, which has the capabilities of displaying and processing images. (one at a time, the images are rather large but I finally decided on resizing them to moderate sizes (e.g. 600*600)) ;) There's not much image processing involved but zoom, mirroring, rotation and brightness change should be possible. The most important fact is performance. The image should be displayed very fast and the image processing steps sould be very fast too. I'm trying to brainstorm some new ideas of doing the displaying and image processing because I tried so many things but I'm not satisfied with the results. I tried it with GDI+ (with and without brushes) and with Managed DirectX (Direct3D and also DirectDraw). Anyone here has good ideas of doing it? Am I on the right path or did I miss a possibility? :confused: Right now I tend to do it with GDI+ because DirectX does not really work faster and is more complicated to use. :) thank you very much. -- modified at 10:22 Tuesday 30th August, 2005

      A Offline
      A Offline
      Andrew Kirillov
      wrote on last edited by
      #2

      Hello What performance would you like to get ? I am using GDI+ and C# for image processing tasks in research areas and it's almost satisfy me. Yes, it's impossible to get such performance to use it in video processing, bit for most image processing tasks GDI+ is almost good enough. There is one great think, that troubles me much and it's leading to performance decrease. As we know the fastest way of image processing is using LockBits and processing data in unsafe block. But, on each LockBits call GDI+ coping the image memory block. And it is sux. So, if you want to implement very fast image processing tools, which can be applied to video processing too, I think you should think about C/C++. As an example look at Intel's library [^]. With best regards, Andrew

      S 1 Reply Last reply
      0
      • S silka_c

        I'm working on an application in C#, which has the capabilities of displaying and processing images. (one at a time, the images are rather large but I finally decided on resizing them to moderate sizes (e.g. 600*600)) ;) There's not much image processing involved but zoom, mirroring, rotation and brightness change should be possible. The most important fact is performance. The image should be displayed very fast and the image processing steps sould be very fast too. I'm trying to brainstorm some new ideas of doing the displaying and image processing because I tried so many things but I'm not satisfied with the results. I tried it with GDI+ (with and without brushes) and with Managed DirectX (Direct3D and also DirectDraw). Anyone here has good ideas of doing it? Am I on the right path or did I miss a possibility? :confused: Right now I tend to do it with GDI+ because DirectX does not really work faster and is more complicated to use. :) thank you very much. -- modified at 10:22 Tuesday 30th August, 2005

        J Offline
        J Offline
        Judah Gabriel Himango
        wrote on last edited by
        #3

        [Message Deleted]

        1 Reply Last reply
        0
        • S silka_c

          I'm working on an application in C#, which has the capabilities of displaying and processing images. (one at a time, the images are rather large but I finally decided on resizing them to moderate sizes (e.g. 600*600)) ;) There's not much image processing involved but zoom, mirroring, rotation and brightness change should be possible. The most important fact is performance. The image should be displayed very fast and the image processing steps sould be very fast too. I'm trying to brainstorm some new ideas of doing the displaying and image processing because I tried so many things but I'm not satisfied with the results. I tried it with GDI+ (with and without brushes) and with Managed DirectX (Direct3D and also DirectDraw). Anyone here has good ideas of doing it? Am I on the right path or did I miss a possibility? :confused: Right now I tend to do it with GDI+ because DirectX does not really work faster and is more complicated to use. :) thank you very much. -- modified at 10:22 Tuesday 30th August, 2005

          H Offline
          H Offline
          HumanOsc
          wrote on last edited by
          #4

          Hello... The point of the question is : how portable should be your app... To use Managed DirectX u need to install it... Ok... But Managed DirectX is one possible way to optimize your performance... Another way is to use Platform Invoke from the native Window GDI API... f.e.: the native StretchBlt Function to doing zooming operation... Best regards... ;)

          1 Reply Last reply
          0
          • A Andrew Kirillov

            Hello What performance would you like to get ? I am using GDI+ and C# for image processing tasks in research areas and it's almost satisfy me. Yes, it's impossible to get such performance to use it in video processing, bit for most image processing tasks GDI+ is almost good enough. There is one great think, that troubles me much and it's leading to performance decrease. As we know the fastest way of image processing is using LockBits and processing data in unsafe block. But, on each LockBits call GDI+ coping the image memory block. And it is sux. So, if you want to implement very fast image processing tools, which can be applied to video processing too, I think you should think about C/C++. As an example look at Intel's library [^]. With best regards, Andrew

            S Offline
            S Offline
            silka_c
            wrote on last edited by
            #5

            Hello Andrew, thank you for your reply. I already use the Lockbits-method and it gave a good performance boost once I implemented it weeks ago. But the performance is still not good enough. I decided to just use C# and no C, but maybe thats the only possibilty to make it faster now. One big problem is that a brightness change should work in realtime, the user should see the change immediately. I tried it with indexed bitmaps and a Change of the Palette of this bitmap, which works wonderful but is still a litle slow. For that reason I wanted to decrease the size of the bitmap before changing the brightness. For that reason I used the Bitmap-Constructor which requires a Bitmap and the Width and Height of the new Bitmap as paramters: public Bitmap ( System.Drawing.Image original , System.Int32 width , System.Int32 height) But the bitmap this constructor delivers doe not have a Palette. :sigh: So I cannot change the Brightness by changing the palette. :confused: Anyone has experience with that? :confused: :confused:

            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