ShareX / ShareX

ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of files to many supported destinations you can choose from.
https://getsharex.com
GNU General Public License v3.0
28.11k stars 3.1k forks source link

Support HDR screenshots #6688

Open greggman opened 1 year ago

greggman commented 1 year ago

It would be nice if ShareX had a way to losslessly capture HDR screenshots. As it is ShareX converts them from 10bits per channel to 8bits per channel, making it a lossy capture.

Searching I found the XBox Game Bar will take HDR screenshots. It saves a .JXR file as well as a .PNG. The .JXR file is HDR

File Name   : Screenshot 1_18_2023 1_06_54 PM.jxr
File Size   : 1108 kB
File Type   : JXR File Type Extension
Author      : Microsoft Game DVR
Pixel Format: 64-bit RGBA Half

Unfortunately it's not a very useful format. Almost nothing loads it. Microsoft has free photoshop plugins for Windows and Mac

PNG supports 16 bits per channel. That would probably be a more useful format.

Also the XBox Game Bar isn't very useful as a screenshot app AFAICT so it would be nice if ShareX could do this

Also, even when ShareX compresses the HDR screenshot to 8 bits it would be nice if it set the correct colorspace on the PNG file so that when viewed it gets shown in HDR (re-expanded to 10bits)

As an example, this page demos HDR support in web pages which Safari and Chrome (and Firefox?) support now. Near the middle of the article it shows 2 green squares and if you have an HDR monitor the square on the right will show up as subtly striped

On my Mac, the built-in screenshot functionality (at least as of Jan 2023) only takes 8bit per channel screenshots but it sets the color space in the PNG so, here's an 8bit per channel screenshot of the green squares of that page from a Mac

mac-display-p3-screenshot

And here's the same page from ShareX on an HDR display on Windows

sharex-screenshot

If you are on an SDR display both squares will look solid green. If you are on an HDR display in HDR mode then the square on the right will appear subtly striped on the Mac screenshot but still solid on the ShareX screenshot. IIUC the only issue here is ShareX needs to set a different color space in the PNG (though I'm not an expert on this stuff).

Just to be clear, it would be nice if

  1. ShareX had the option to save lossless HDR screenshots. Probably PNG 16bits per channel
  2. ShareX set the color space on 8bit PNGs so they get expanded back HDR on HDR displays

These aren't demands, just suggestions, more and more things are going HDR so it seems like ShareX might want ot support it too. Thank you so much for ShareX. It's super useful!

related: https://github.com/ShareX/ShareX/issues/6566 https://github.com/ShareX/ShareX/issues/6135

Aemony commented 1 year ago

With web browsers moving towards using HDR wherever's appropriate, especially MS Edge, this has become more relevant than ever as even tabs without HDR videos or such playing on them might be running in HDR mode and therefor producing overly bright screenshots.

Example from an article on PCGamingWiki running on Microsoft Edge:

image

mrambossek commented 1 year ago

yeah this has bugged me for years now, pleeeease do something about HDR capturing :)

ProjectSynchro commented 1 year ago

There was a PR open that went stale in respect to HDR support: https://github.com/ShareX/ShareX/pull/5565

terax6669 commented 1 year ago

There was a PR open that went stale in respect to HDR support: #5565

I've downloaded and built it but it doesn't work for me (unless there's a flag that I need to enable that I don't know about).

Seeing as this won't be fixed, any other screenshot tool you guys can recommend?

Elrinth commented 1 year ago

yes I also want this feature. HDR screenshots with sharex just look terrible for me.

In OBS (Open Broadcaster Studio) when recording HDR content via Window Source there is a "FORCE SDR Content" checkbox. I am required to use this if I want to be able to use color masking.

Perhaps a similar checkbox can be added to ShareX? Like if I right-click the sharex icon I can somewhere in the settings select this?

ugzv commented 1 year ago

They appear too bright and overexposed, making it difficult to see the content. This happens consistently across multiple devices and browsers. I hope we can overcome this somehow.

ItzDerock commented 1 year ago

Commenting to show my interest in having this feature too. I have to drag my content to a non-hdr display and take a screenshot there. It is very inconvenient, especially if I'm trying to take a screenshot of a game or something that is borderless fullscreen. Hopefully someone is able to pr a fix for this.

Day0Dreamer commented 1 year ago

That would be great

Patba commented 1 year ago

Would like to bump this issue here, It's quite annoying to have it overexposed every time

deroverda commented 1 year ago

Would love if this got implemented!

SuperFurias commented 1 year ago

i need it. beside the xbox game bar, there is no way to capture a screenshot in hdr mode without.. your eyes exploding

juicyjor commented 1 year ago

bumping this issue

hippocoder commented 1 year ago

Please fix.

francis2054 commented 1 year ago

Bump, sharex is the greatest screenshotting tool, please keep it that way <3

SuperFurias commented 1 year ago

I really need support for HDR, i literally can't use anything beside the xbox game bar to take a screenshot.

sasjafor commented 1 year ago

I would also be glad. More and more games are starting to support HDR and it's not always possible to turn it off before taking a screenshot.

Hexag0nSun commented 1 year ago

A bad workaround for browsers would be to disable hardware acceleration which I assume disables in-browser HDR.

subz390 commented 11 months ago

+1 for my interest in HDR captures. I mostly use this for capturing game screenshots. But not only that, when I do capture them now the colors are all blown out and horrid. At least sort that part out even if you're not giving us a full HDR image save.

GT500org commented 10 months ago

Taking screenshots in HDR would be nice, but so would the option to tonemap HDR screenshots to SDR to avoid that washed out overly bright look.

Berserker66 commented 10 months ago

HDR captures or at least making HDR captures look like the correct SDR would be great.

undeadbanana commented 10 months ago

I want this to work also, in the meantime though. If you use Microsoft's HDR calibration tool, it'll adjust SDR content for you if you calibrate appropriately. I noticed I didn't have issues with Sharex before I reformatted and the only thing, I had done was use that program, so just tried it again and zero issues. Pictures look okay with hardware acceleration on and AutoHDR on.

https://apps.microsoft.com/store/detail/windows-hdr-calibration/9N7F2SM5D1LR?hl=en-us&gl=us&rtc=1

nosut commented 8 months ago

+1 for HDR support

1serjr1 commented 8 months ago

same for me, HDR is becoming widely in demand and it will be nice to have compatibility with it

Vlasterx commented 7 months ago

+1 for HDR support!

JFPCreations commented 7 months ago

+1 for HDR support!

robertheadley commented 7 months ago

Turning HDR on and Off is quite annoying, so it would be nice if ShareX would support capturing the browser etc when HDR is enabled. +1 from me.

howar31 commented 7 months ago

HDR support is needed

juztim commented 7 months ago

+1 to this, I use Windows 10 and therefore cant use the HDR calibration tool

Araraura commented 7 months ago

Please I need this

Davidnovarro commented 6 months ago

+1

ProjectSynchro commented 6 months ago

Just putting this out there since I seem to be subscribed to this via email. Adding +1, me too, etc. doesn't really help solve this at all.

I do get that most people would love it (myself included) but it's just adding spam to this thread.

GT500org commented 6 months ago

Just putting this out there since I seem to be subscribed to this via email. Adding +1, me too, etc. doesn't really help solve this at all.

I do get that most people would love it (myself included) but it's just adding spam to this thread.

It tells the developers how many people want HDR support. At the end of the day the developers can still ignore it, but the more people who add a +1 the more the developers will realize that it is something users want and increases the chance that they will change their minds about not implementing HDR support.

For those who don't want e-mail alerts every time someone adds a +1, I recommend unsubscribing from this issue on Github, or checking to see if you can disable e-mail alerts in your Github notification settings.

terax6669 commented 6 months ago

It tells the developers how many people want HDR support.

I'm sorry and that changes what exactly? The maintainer already said he doesn't care. You think a "+1" gonna change his mind after so many years? Lol.

If you want to simply show how many users there are who need this go to the top of the thread and react like the rest of us.

I'm subscribed here to see actual updates, like someone making a fork, not to see your stupid spam messages and arguing about not being able to comprehend how github works. FFS...

Vlasterx commented 6 months ago

It tells the developers how many people want HDR support.

I'm sorry and that changes what exactly? The maintainer already said he doesn't care. You think a "+1" gonna change his mind after so many years? Lol.

If you want to simply show how many users there are who need this go to the top of the thread and react like the rest of us.

I'm subscribed here to see actual updates, like someone making a fork, not to see your stupid spam messages and arguing about not being able to comprehend how github works. FFS...

Things change, people change their minds. With the wider adoption of HDR monitors, this feature will become available either here or some competitor will make it for their own software.

If you don't want to see future updates, one would think that you would have learned by now how to use Unsubscribe feature.

image

Also, this kind of language is not for the Github. If you have anger issues, keep them out of here.

polyjitter commented 6 months ago

If "the maintainer doesn't care", that's frustrating. I've been using ShareX for 8 years, and if that's really the attitude, I'll find another solution, "Deal with blown out over exposed screenshots because f*** you" is really a whole lot of "that's that, no reason to try to convince you, I'll go find someone else to support".

That being said, yeah, you can just unsubscribe from an issue. Comments are made for discussing issues. This is a discussion. If you don't want to discuss it, then don't be in the discussion.

SSCBryce commented 6 months ago

I also have to chime in for this, or even if you did a "Forced SDR" like OBS does for streaming, would also be fine. As long as the colors don't look all messed up, it's good enough for now.

nzkfc commented 5 months ago

Yeah came here to find a fix, found this.... author not caring about this is only a matter of time when they have HDR and go "this sucks"

Tbh no point in maintaining this if no one uses it, so it's really a good idea to listen to your "users" before something better comes along and takes it all away.

https://i.imgur.com/2iLnc8S.jpeg

DasDunkel commented 5 months ago

Last time I checked HDR screenshot capture was an issue with APIs provided by microsoft since even their own software (like snipping tool) struggles to capture it

OBS has workarounds as it uses different capture methods more suited for video capture, including pulling frames directly from the GPU.

There's not much that can be done other than waiting for Microsoft to better support HDR, which may finally be happening.

Feel free to jump ship though.

randomguyingithub commented 5 months ago

It is surprising how people twisted there are no good ways to support HDR to developer being lazy, don't care and hates HDR.

OBS seems directly uses Directx for HDR support (and the SDR switch, correct me if I'm wrong), which they have done already since they needed it for game capture. That would have been a lot of work for a screenshot tool (and still sometimes overexposed for window capture in obs case)

nzkfc commented 5 months ago

Snipping tool has worked with HDR for years, does not seem like it's some new advanced tech, sure it might not be easy but it is doable.

On Mon, 11 Dec 2023, 2:44 am Dunkelheit, @.***> wrote:

Last time I checked HDR screenshot capture was an issue with APIs provided by microsoft since even their own software (like snipping tool https://answers.microsoft.com/en-us/windows/forum/all/over-exposure-in-screenshots-and-recordings-with/3473f08b-c4bb-40ca-bf95-4a0b94cc4e4e) struggles to capture it

OBS has workarounds as it uses different capture methods more suited for video capture, including pulling frames directly from the GPU.

There's not much that can be done other than waiting for Microsoft to better support HDR, which may finally be happening. https://www.pcgamer.com/better-hdr-screen-capture-is-finally-coming-to-windows-thanks-to-an-updated-snipping-tool/

Feel free to jump ship though.

— Reply to this email directly, view it on GitHub https://github.com/ShareX/ShareX/issues/6688#issuecomment-1848969816, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGHUHMC7KNWGAKLL6EWK43YIW4FPAVCNFSM6AAAAAAT7TEJRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYHE3DSOBRGY . You are receiving this because you commented.Message ID: @.***>

Berserker66 commented 5 months ago

Microsoft's XBOX Game Bar can also capture HDR just fine, it actually outputs both a normlized PNG and an HDR capable file. It has become the one thing I use that program for, because this one unfortunately doesn't work.

randomguyingithub commented 5 months ago

Literally dunk linked a post with people say game bar is clunky as you need to edit it your itself with hdr tool (and OP also says it is clunky) and snipping tool doesn't work well... if it works for you great!

But given how people above just complain without ever reading context and twists words, if HDR screenshot not works most of the time or not straightforward, they will complain similarly again.

And again if you don't have any suggestion on how to solve it and worse just say dev are bad etc. . please don't post here as it is not a place for ranting, it is a place for working on solution. And remember it could flood people email and notification with your rant.

GT500org commented 5 months ago

It is surprising how people twisted there are no good ways to support HDR to developer being lazy, don't care and hates HDR.

OBS seems directly uses Directx for HDR support (and the SDR switch, correct me if I'm wrong), which they have done already since they needed it for game capture. That would have been a lot of work for a screenshot tool (and still sometimes overexposed for window capture in obs case)

I'm not 100% certain, but I think OBS Studio uses this for video capture when you set your window source to "Windows 10" instead of the default "BitBlt (Windows 7 and up)": https://learn.microsoft.com/en-us/windows/win32/api/dxgi1_5/nf-dxgi1_5-idxgioutput5-duplicateoutput1

Based on what I'm seeing that allows for 10-bit HDR capture when HDR is enabled for your display.

I think the issue is that ShareX will need to be updated to support 10-bit (it probably only supports 8-bit) before HDR can be added. I'm assuming this is a ton of work since very few open source projects seem to be adding 10-bit support to their software (notable exceptions are FFmpeg, FastFlix, and I think Shotcut which are for transcoding and editing videos).

As for Snipping Tool neither the version that comes bundled with Windows 10 nor the version on the Microsoft Store were able to capture screenshots from Cyberpunk 2077 with HDR enabled without the same oversaturated colors that you see in ShareX. I did not try the XBOX Game Bar as I have it disabled.

There are only two ways that I know of to take screenshots in games that have HDR enabled on Windows 10. The first is OBS Studio, and the second is SpecialK. Now SpecialK is capable of taking actual HDR screenshots, but very few programs can open them, and fewer still actually support displaying 10-bit HDR images, and using SpecialK in multiplayer games risks you getting banned due to the fact that it alters the way a game's swapchain works (among other things). OBS Studio is safer, and will tonemap HDR captures to SDR for screenshots (making them easier to share), but as far as I know it can't save screenshots in formats that actually support HDR.

randomguyingithub commented 5 months ago

I searched a bit and Gamebar only supports HDR screenshots on Windows 11 (and probably a similar situation to snipping tool), also Gamebar is a UWP app while ShareX is a Winform app. So it is not possible to do something similar.

GT500org commented 5 months ago

I searched a bit and Gamebar only supports HDR screenshots on Windows 11 (and probably a similar situation to snipping tool), also Gamebar is a UWP app while ShareX is a Winform app. So it is not possible to do something similar.

Microsoft restricts certain programming API's so they only work with UWP apps?

randomguyingithub commented 5 months ago

I searched a bit and Gamebar only supports HDR screenshots on Windows 11 (and probably a similar situation to snipping tool), also Gamebar is a UWP app while ShareX is a Winform app. So it is not possible to do something similar.

Microsoft restricts certain programming API's so they only work with UWP apps?

They only update newer technology for their newer UI framework most of the time. here's UWP API that let you to get frames in HDR: https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture

GT500org commented 5 months ago

Microsoft restricts certain programming API's so they only work with UWP apps?

They only update newer technology for their newer UI framework most of the time. here's UWP API that let you to get frames in HDR: https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture

So not IDXGIOutputDuplication then. That means ShareX could just do it using the same DXGI API that I think OBS Studio uses for HDR capture.

Berserker66 commented 5 months ago

I searched a bit and Gamebar only supports HDR screenshots on Windows 11 (and probably a similar situation to snipping tool), also Gamebar is a UWP app while ShareX is a Winform app. So it is not possible to do something similar.

Well, I'm using Windows 10 and it's working fine.

Aida-Enna commented 4 months ago

It is surprising how people twisted there are no good ways to support HDR to developer being lazy, don't care and hates HDR.

Can you link the developer's post on HDR?

sasjafor commented 4 months ago

It is surprising how people twisted there are no good ways to support HDR to developer being lazy, don't care and hates HDR.

Can you link the developer's post on HDR?

All I found was this https://github.com/ShareX/ShareX/issues/6135#issuecomment-1113766330