b-init / ImagePaste

A simple Blender addon to grab images from your clipboard and paste as a reference image in viewport or onto the image editor.
GNU General Public License v3.0
246 stars 9 forks source link

BUG: Pasted image looks washed out when Filmic Selected in color management #47

Closed apeironn8 closed 1 year ago

apeironn8 commented 1 year ago

Describe the bug

when Render Properties/Color Management/View Transform/ is set to Filmic, the pasted image appears washed out instead of what's displayed in Blender's image editor. tested in 1.8.1 and 1.9.0

see example, Top one screenshotted from windows vs pasted output at bottom.

image

Step to reproduce

go to Render Properties/Color Management/View Transform/ set to filmic render, copy and paste

Relevant log output

No response

Expected behavior

same as what's shown in blender

Platform

Windows

Platform version

10

Blender version

Other

ImagePaste Version

1.8.1

b-init commented 1 year ago

Ah that's because of the shader settings when image is pasted as a plane. As you can see setting the color space to Filmic sRGB fixes it, and reference images should look the same no matter the color management settings.

But this should be set automatically, or the addon should provide options to set defaults in the addon preferences. We'll try to fix this in upcoming updates. Thanks a lot for reporting!

sRGBimg FilmicsRGBimg

apeironn8 commented 1 year ago

Great Thanks! to clarify my use case, I'm not pasting an image into blender,

I'm doing a render and then "copy to clipboard" from blender's image editor, then pasting that render output into photoshop. the pasted image suffers from the same problem in photoshop.

b-init commented 1 year ago

That's very interesting. I did some testing. Turns out ImagePaste first saves the render as a png file, there's no loss in quality here. Then while copying, it first copies it to the clipboard in PNG format (so softwares that support this format work just fine, like paint.net and most others) after which it converts it to BMP and copies in BMP format (Photoshop doesn't support PNG, so it uses BMP and hence colors are washed out it's always photoshop, half this repo's issues is photoshop ).

The problem is that the conversion to bmp currently ignores the scene settings, not taking care of the color space conversion. Should be easy to fix. Thanks a lot for pointing this out, so important yet easy to miss!

apeironn8 commented 1 year ago

Glad I could help! as far as I'm aware you should be able to paste a PNG in photoshop directly, its just the transparency that gets lost? (which would be lost anyway in BMP)

b-init commented 1 year ago

I don't think it does, through the clipboard I mean. Windows' clipboard is actually rather complicated to work with, there is no standard and most programs store image to clipboard in PNG format (along with several other formats). Some don't use PNG at all. Those programs often use BMP instead (which does actually support transparency, it's just much harder to work with compared to PNG. Also, blender doesn't yet support BMPs properly so we're stuck though it's being worked on and things will be much easier once the work is done). Photoshop likes to use their own proprietary formats. PNG doesn't work at all and BMP works but not with transparency.