Alpha channel appears to still not function either copying or pasting; from blender->photoshop, alpha is interpreted as a 100% (ie, fully black image, or lacking alpha data, depending on direction of copy/paste).
(To Harley - pls forgive me if my “photoshop alpha/trans not working” reports get annoying. I can hold off reporting any photoshop issues if you like, until you believe it should be working.)
What version of Photoshop are you using? And which direction gives you “fully black image” verses “lacking alpha”?
I only have an ancient version of Photoshop. About says “PhotoShop CS2. Version 9.0”. Not sure if it is new enough to be worth testing against. At one point I might download a trial version of the newest version for some testing (assuming I can copy/paste with a trial).
No worries at all. But it is possible for me to get to a point where it moves RBGA between most programs except Photoshop and I might consider it good enough. Or it could be left for future fixing.
Do you compile Blender from source code yourself? Just in case I can use you for further testing later.
So far not seeing a lot of ways of getting alpha to work with Photoshop. From my old version it is offering the following:
49161 - DataObject
8 - CF_DIB
3 - CF_METAFILEPICT
2 - CF_BITMAP
9 - CF_PALETTE
50531 - Photoshop DIB Layer
50516 - Photoshop DIB Layer X
50921 - Adobe Photoshop Image
19163 - Embed Source
49156 - Native
49155 - OwnerLink
49166 - Object Descriptor
49171 - Ole Private Data
14 - CF_ENHMETAFILE
17 - CF_DIBV5
With none of the non-proprietary formats containing an alpha layer. The last one listed (CF_DIBV5) can transport alpha but in this case it is synthesized by the OS from CF_BITMAP and not actually placed by Photoshop - and so does not contain alpha.
In case this is just my old version, some recent links about this issue, include one that documents all the formats it currently offers:
I have tried with an almost up to date version of Photoshop (24.1.0, current is 24.3.0), and I can confirm that it does not work. The result is alpha treated as either non existent (blender → ps) or fully white(ps → blender).
Sorry, the “fully black image” description is quite confusing without context - I should not have described it that way. But for clarity (just to explain), I was copy/pasting the grease pencil “ink lines only” layer from Blender to PS. Since the ink lines themselves are black, it was a fully black image. (However, very confusing way to report bug behavior on my part).
To be more accurate, everything that should be transparent is simply filled black.
TXO’s post gives a much better illustration of what I’m seeing.
Re: PS itself - I’ve been doing some brief internet searching, and it appears to me that the problem may be inherent to PS. It’s somewhat bad at dealing with Copy/Paste transparent PNG files - it completely fails in the trans paste if the source is a PNG in Firefox, for example. So I don’t think the problem is necessarily your code; they’ve possible got some internal operation that handles it within their own ecosystem, but apparently mixed results (if at all) outside of that ecosystem. Gimp Copy → PS Paste also fails, for example.
I’ve not been able to get BL-GIMP trans to work either, but my skills with GIMP are practically ZERO. Perhaps there’s a trick with GIMP i’m simply oblivious to, so I’ll not offer an “official” bug report.
Normally I download the compiled ZIP files to explore new alpha features, but I can (and have) compiled both the 3.6 alpha as well as the GooEngine fork. (So, if compiling an experimental build such as this is a similar process, I believe I could compile it as well). While my dev skills are nearly none, I’m quite happy to check code tweaks on my system as needed.
It is what I got also from reading threads, and my own hair-pulling experiences while working. PS is surprisingly shitty with alphas depending what you need to do.
If you look at the channels window in photoshop there is no alpha channel, just R,G,B and the combined RGBA at the top of the list. It is as if the alpha is already premultiplied by default in every channel, and that is fine while working. But it makes it impossible* to export a PNG with alpha as a channel (i’ve tried to do it creating it by hand explicitly), so it forces you to export to create a custom layer group by hand (that is actually regular RGB layers, just white and black), and then export two images, one RGB, one A.
I actually have done this a lot of times in some situations while working with PS and nuke doing camera projections with PNGs, in order to avoid the typical white/black outlines that appear due to premultiplication errors.
*: at least I have found not way to make it work, so I scripted the workaround to avoid doing it by hand every time. But is still a glaring omission by PS, if you ask me.
I think it may be an issue with the PNG format; I’m not sure it supports 4 channels, but instead relies on transparency being encoded within the color index? (see correction below) Honestly, my preferred format for most things is TIF, so normally I’m not that concerned with PNG trans situations.
I was told software like maya and vray can paste to photoshop with alpha. I assume they use Adobe Photoshop Image format on the clipboard, but I do not own maya/vray to verify… could anyone help? You can run clipette.py to print formats after copying the image. I’m pretty sure that’s the only way for alpha to work with photoshop.
Oh and OpenImageIO does seem support this format, so adding support for alpha in photoshop should be much easier once we switch to it.