Using Graphics Card instead of GDI+ for Image Manipulation

后端 未结 2 1816
温柔的废话
温柔的废话 2021-01-07 06:15

I have a question, which may be a pipe-dream, but I wanted to know if any of my fellow Stack Overflow\'ers could help me with.

In the company I work for, we do

2条回答
  •  执笔经年
    2021-01-07 06:25

    A few technologies to look into:

    1. Windows Imaging Components. this isn't exactly what you're after since i don't think it uses the GPU (although i could be wong) but it should be significantly faster than GDI+.

    2. Direct2D. this does use the GPU for many drawing operations and integrates well with the Windows Imaging Components. but from your description it's not clear whether the drawing operations optimized by the GPU fit exactly what you need.

    On top of those you can try using pixel shaders for the image manipulation. this is an area I haven't delved into so i'll leave it for others to comment.

    To put it another way, Windows Imaging Components should reduce the PNG load/save bottleneck significantly. the operations it provides will probably also help slice the image up in a much more optimal way than GDI+. Direct2D and/or a pixel shader should help with the pixel-level manipulation. the pixel shader should only be needed if there's no more direct way to do the color quantize operation you need on the images.

提交回复
热议问题