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

  • SEARCH
  • Home
  • 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 703047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:47:18+00:00 2026-05-14T03:47:18+00:00

I am creating screenshots under Windows and using the LockBits function from GDI+ to

  • 0

I am creating screenshots under Windows and using the LockBits function from GDI+ to extract the pixel data, which will then be written to a file.

To maximise performance I am also:

  • Using the same PixelFormat as the source bitmap, to avoid format conversion
  • Using the ImageLockModeUserInputBuf flag to extract the pixel data into a pre-allocated buffer
  • This pre-allocated buffer (pointed to by BitmapData::Scan0) is part of a memory-mapped file (to avoid copying the pixel data again.)

I will also be writing the code that reads the file, so I can use (or invent) any format I wish. However I would prefer to use a well-known format that existing programs (ideally web browsers) are able to read, because that means I can visually confirm that the images are correct before writing the code for the other program (that reads the image.)

I have implemented this successfully for the PixelFormat32bppRGB format, which matches the format of a 32bpp BMP file, so if I extract the pixel data directly into the memory-mapped BMP file and prefix it with a BMP header I get a valid BMP image file that can be opened in Paint and most browsers.

Unfortunately one of the machines I am testing on returns pixels in PixelFormat64bppPARGB format (presumably this is influenced by the video adapter driver) and there is no corresponding BMP pixel format for this.

Converting to a 16, 24 or 32bpp BMP format slows the program down considerably (as well as being lossy) so I am looking for a file format that can use this pixel format without conversion, so I can extract directly into the memory-mapped file as I have done with the 32bpp format.

What raster image file formats support 48bpp (BGR order, little-endian) and/or 64bpp (BGRA order, little-endian)?


Edit

I have ruled out these formats so far:

  • BMP: Depth limited to <=32bpp (would be a perfect match otherwise.)
  • PNG: Sample order can only be RGBA.
  • TIFF: Sample order can only be RGBA.

Possible partial solutions:

  • OpenEXR: 48bpp only. Sample order is alphabetical by channel name; BGR fits but BGRA does not.
  • 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-14T03:47:18+00:00Added an answer on May 14, 2026 at 3:47 am

    It seems that the only reason you need a standard format is for display/testing purposes. So roll your own format, but convert to PNG or TIFF for display. And then move on…life is short.

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

Sidebar

Related Questions

I am trying to capture screenshots using the BitBlt function. However, every single time
Summary So I have 3 tables, which I have screenshots below. Every user will
Creating a server-side socket will fail if I'm trying to use the same port
Creating a simple RPG game, first time using XNA. Trying to get my character
I'm creating a HTML Component in Flex, loading a URL and then capturing that
I'm creating a DLL using Visual C++ Express, and when declaring extern ValveInterfaces* VIFace
I'm creating an application (Windows Form) that allows the user to take a screenshot
I'm at the moment creating an ASP.NET web app which should call a WCF
I am creating Drawing app for ipad using cocos2d-iphone its using CCRenderTexture for drawing.
I'm creating a text box that automatically completes the input from a list. For

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.