Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 264037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:39:07+00:00 2026-05-11T22:39:07+00:00

I have a 16 bit grayscale image that I want to display using WPF

  • 0

I have a 16 bit grayscale image that I want to display using WPF in .NET 3.5 sp1. Currently, I display that image using an embedded winform that uses OpenGL to set the image display format to Luminance 16.

DirectX has a similar property, SurfaceFormat.

I want to be able to display an image in WPF and set the SurfaceFormat to Luminance16. How do I do that?

Note: Currently, even though WPF natively supports Gray16, it doesn’t render Gray16 properly.

Edit: The real answer is that WPF does not do what it says it does. Gray16, while supported natively, is actually divided by 256 in order to fit into a 16 bit display. So, the Gray16 format is a lie that burns like acid in the eyes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:39:08+00:00Added an answer on May 11, 2026 at 10:39 pm

    You shouldn’t need to do this in WPF.

    WPF supports 16bpp grayscale images natively. I believe they can be loaded from a TIF file using the built in TIFF format decoder.


    Edit in reponse to comment:

    If you’re unhappy with the default rendering in WPF, you can also use DirectX to directly render the surface. This is (thusfar) best done using C++/CLI, but it is possible entirely in C# using SlimDX.

    The best approach out there is to use D3DImage. There’s an intro to using this on CodeProject. You should be able to port your OpenGL code across pretty much directly, taking into account the differences in DX. The nice thing about D3DImage, though, is that you no longer need to host a common control – you can put this directly into a WPF Brush and use it anywhere in WPF.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 152k
  • Answers 152k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Have a look at these: http://docs.joomla.org/Tutorial:Creating_a_basic_Joomla!_template http://www.siteground.com/tutorials/joomla/ May 12, 2026 at 10:09 am
  • Editorial Team
    Editorial Team added an answer Appears to be a bug in Tomcat 6. If you… May 12, 2026 at 10:09 am
  • Editorial Team
    Editorial Team added an answer You need to use nextAll() $(this).parent().nextAll().css('display','none'); or even better: $(this).parent().nextAll().hide() May 12, 2026 at 10:08 am

Related Questions

I have an array of ushort pixel data that I need to save as
I'm trying to read a 16-bit greyscale TIFF file (BitsPerSample=16) using a small C
I have an array of ushort pixel data (16-bit grayscale values), and I am
I have an 8 byte message where the differing chunks of the message are

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.