[GDI+] ColorMatrixEffect

I am not sure where a GDI+ question is supposed to be posted, so feel free to move it if it should be somewhere else. But I read up on ColorMatrixEffect, and it says it is suppsed to do "Affine Transformations".

http://msdn.microsoft.com/library/default.asp url=/library/en-us/gdicpp/GDIPlus/GDIPlusreference/classes/colormatrixeffect.asp

Does that mean translating 3D points, or are they talking about some translation of colors

An other thing. Isn't it possible to use this function in C#, only C++


Answer this question

[GDI+] ColorMatrixEffect

  • Don Collins

    OK, thanks for your input.

    There is no way we are going to use any DX in this small screensaver 3D engine thingy. This is just going to show the power of .NET..:)


    Thanks again.
    - OO -

  • dugi40

    I suspect the c# ColorMatrix is just the managed wrapper around the ColorMatrixEffect unmanaged GDI+ call. Hence CME only from C++ (unless you set up your own interop of course). Both just take a 5x5 array.

    There is a fast way of doing a perspective bitmap - its called Managed DirectX :-) Though of course you have to do everything in MDX then as its hard to mix GDI & DirectX

  • futelihut

    Wow, that was seriously good looking. As he have done, we have also turned to some unsafe code. Not too much, but some has to be used. But we are far from done though. Still LOTS to do. But here is the last screenshot (or call it bugreport) from the engine/screensaver:

    http://vbforums.com/attachment.php attachmentid=39850&stc=1

    please don't talk bad about the test textures..:D


    - OO -

  • scottt40

    They are talking about translation of colours. instead of multiplying each x,y,z,w by a matrix you multiple the RGBA and you get a new RGBA.
    http://msdn.microsoft.com/msdnmag/issues/05/01/NETMatters/
    http://www.codeproject.com/vb/net/colormatrix.asp

    The other 'effects' (http://msdn.microsoft.com/library/default.asp url=/library/en-us/gdicpp/GDIPlus/GDIPlusReference/Classes/Effect.asp) are also done with matrix transformations though in this case the matrices tell you how much influence each neighboring pixel gets  rather than individual RGB parts
    http://www.student.kuleuven.ac.be/~m0216922/CG/filtering.html


  • nkotb

    They you might look at Alan Simes software rasterizer

    http://alansimes.blogdns.net/forums/12/ShowPost.aspx

    There will be code in there for drawing a quad at a particular 3d view all in software. And you can see how fast it is.


  • Fritzie Ligeralde

    I guess you are right, but your links are about ColorMatrix, and not ColorMatrixEffect. ColorMatrix can be used in C# too, I have all ready done that,  but ColorMatrixEffect seems to only be avalible for C++ for some reason.

    The faqt that for CME it only says affine transformations, but for ColorMatrix it says transforming colors was the thing that made me wonder. Because I wish there was a fast way to do perspective rendering of bitmaps in C#.

    BTW, do you know the difference between CM og CME   



    - OO -

  • [GDI+] ColorMatrixEffect