I would like to thank you for taking over this project. I am not a programmer, but I will always give you as much useful info about an issue as I can manage to discover. I will do my best to help in any way I am capable of.
I have now discovered that the real issue is that the Transparency feature of many of the formats JPEGView supports is not supported by JPEGView.
I will start with describing that problem which is in the title for this issue.
Image formats I tested that are supported by JPEGView, which are also transparency capable formats:
BMP, GIF, PNG, TGA, TIFF, WEBP, HEIC (HEIC is supported through WIC)
The TransparencyColor setting in the JPEGView.ini file only changes the transparency color for PNG and TIFF files of all the file formats in the above list. But for all the other formats, changing the Transparencycolor setting doesn't have any effect, which for most of those formats is always black, but for some formats it is a different color.
I discovered the problem when using a GIF image file, but then decided to try another format that supports transparency, and PNG worked. So to help you a bit, I decided to go though all the formats that JPEGView supports, which are also transparency capable formats. In the process I discovered that there are differences in the unchangeable transparency color for some formats. Then I read the WEBP Rendering issue posted here, and there I saw that JPEGView didn't support Transluscency in WEBP, which is when I realized that JPEGView doesn't support the transparency feature of WEBP and many other formats that are transparency capable.
So I used paint.net to make a fully transparent spot at the bottom half of a picture, as well as a transluscent spot at the top half of the same picture. I then saved the picture in all the different formats I listed above. Here is a zip file of the same picture all image formats.
Transparency test.zip
Also here is a list of all the formats (also in the zip file) that JPEGView doesn't seem to have transparency support for, along with the transparency color and info about how the transluscency is rendered for each format. (Transluscency = Partial Transparency)
BMP - Transparency color is always Black. Translucency shows as fully Solid.
GIF - Transparency color is always Black. Gif is the only format where the format itself doesn't support Transluscency, so the image I provided will show the semi-transparent part as fully transparent, and therefore is also rendered as black.
TGA - Transparency color is always Light Greyish Beige. Translucency is kept, but with the same unchangeable transparency color for the transluscency.
WEBP - Transparency color is always a strange pattern of colors. Translucency shows as fully Solid.
HEIC - Transparency color is always Black. Translucency shows as fully Solid.
I should mention that I am using Windows 7. So for the HEIC format to work with JPEGView, I had to install Copytrans, which installs a WIC codec for HEIC and HEIF, and allows HEIC files to have thumbnails.
www.copytrans.net/copytransheic/
So for HEIC, I noticed that even the thumbnail has a black transparency color and renders the transluscency as fully solid, and Windows 7 Photo Viewer also shows a black transparency color and renders the transluscency as fully solid. That tells me 2 things:
-
The HEIC codec installed by Copytrans possibly doesn't support Transparency. And if that is the case, then JPEGView may never be able to use that particular HEIC codec to support Transparency in HEIC files on Windows 7/8. And it seems there may be the same issue with the Windows 10 HEIC codec considering that someone had to make an HEIC codec plugin for the paint.net image editor to replace the Windows 10 HEIC codec in order to support transparency with HEIC in paint.net.
-
It seems when transparency is not supported, a color is actually chosen by the codec to fill in the transparency since it has to fill in the empty data in order to be able to render the picture without the use of transparency. And the transluscency is set to render as fully solid by simply setting the alpha channel back to the maximum setting of 255. The one exception to this in JPEGView for any of the image formats I listed is the TGA format which seems to render the transluscency over a color chosen by the codec which seems to be happening from the codec just filling in all the fully transparent pixels that make the transluscent area look transluscent rather than changing the alpha channel up to 255 for those transparent pixels to become solid again. So it seems that transluscency with TGA is also not supported in JPEGView even though it is rendered differently than with other image formats.
I don't know if a program has to be programmed to use all the features that an image codec supports for an image format, or if a program must only be programmed to use the codec, and it is instead up to ONLY the codec itself to support all the features of an image format. But if it is the latter, then I suppose the codecs used by JPEGView may be the only thing that needs to be changed to support Transparency.
If you will have to program JPEGView to use the transparency feature which the codec will also have to support, then the only info I have is that you need to support the "alpha channel" to render the image with transparency. There are 256 values for the alpha channel (0-255), with 0 being completely transparent and 255 being completely solid. Everything in the middle is refered to as partial transparency or transluscency. The Gif format is only capable of fully transparent or fully solid. All the other formats I've listed can use all 256 alpha channels. But some formats can have the same limitation with transparency as GIF if saved in 8-bit color such as PNG which is capable of being saved anywhere between 8-bit and 32-bit color. I think I heard somewhere that 32-bit color for an image is 24bits + Alpha channel. I do find that when I save a PNG in 24-bit color, the transparency doesn't look the same as 32-bit color when using paint.net (nothing to do with JPEGView), and continues looking different all the way down to 8-bit.
I came across the following webpage that shows a list of image formats that WIC supports as NATIVE CODECS. Since Windows 7 Photo Viewer (I only assume is using the WIC codec for BMP) renders BMP with transprency, I tried adding BMP to the list of files to open with WIC in the JPEGView.ini file, but that didn't allow bmp files to render with transparency. I don't know if JPEGView would have to be programmed to stop loading the BMP codec that it is currently using for what I tried to work, or if JPEGView is already using the WIC codec for BMP, which would mean that it is up to you to program JPEGView to support Transparency.
https://docs.microsoft.com/en-us/windows/win32/wic/-wic-about-windows-imaging-codec
One last thing is that the photoviewer called Imageglass is capable of rendering transparency for even HEIC. And at the top of the following webpage they say that they use the Magick.NET library to support the list of image formats. So maybe having JPEGView support the Magick.NET library or something similar would be the quickest answer to the problem of JPEGView not supporting transparency for all transparency capable formats.
https://imageglass.org/docs/supported-formats