.NET InterpolationMode algorithm RRS feed

  • Question

  • Does anyone know what "Prefiltering" exactly does with HighQuality (eg. HighQualityBicubic and HighQualityBilinear) Options in the System.Drawing.Drawing2D.InterpolationMode property of the .Net Framework? MSDN² delivers no info and only mentions, that there is some kind of prefiltering done. I know what Bilinear and Bicubic does, that is obvious but the "prefiltering" is an unknown black box.

    I'm visualizing scientific data and do bilinear upscale on one low res axis. I like the way HighQualityBilinear smooths certain aspects of it. But I have to know exactly what happens, as not to alter result data in a way I don't know and introduce errors in futher analysis. Nowhere am I able to find any reference to what kind of prefiltering is being performed


    • Moved by CoolDadTx Monday, November 21, 2016 3:48 PM Winforms related
    Monday, November 21, 2016 1:51 PM

All replies

  • No specific information. But when doing this kind of work, you propably want to work with the GPU more directly anyway. There are ways to just run this code there directly. Rather then running the operation in a Drawing related class and hoping it will run on the GPU (wich I am pretty sure will not happen anyway):

    Remember to mark helpfull answers as helpfull and close threads by marking answers.

    Monday, November 21, 2016 3:45 PM
  •  Nowhere am I able to find any reference to what kind of prefiltering is being performed


    I also didnt find anything about this prefiltering. What I did, is to use custom bicubic filters to scale the images. There's a good visualization of whats happening with different "B" or "C" parameters in the german wiki article, as well as the "one line formula" for implementing that filter:



    Monday, November 21, 2016 3:54 PM