Closed FlatCell closed 8 years ago
再現しないので、Input.bmpをアップロードしていただけないでしょうか? よろしくお願いします。
Sure here is the link to the file: https://drive.google.com/file/d/0Bweq4bg_RcmCNTVoS0stVEl0VGM/view?usp=sharing
ImageMagick/GraphicsMagick has the same problem. But it seems that this is browser/viewer side bug. the result of waifu2x-caffe is correct.
R channel:
G channel:
B channel:
A channel:
R+G+B:
R+G+B+A:
BMP3 does not allow transparency http://www.imagemagick.org/discourse-server/viewtopic.php?t=28733#p127820
Maybe browser/viewer follows the above specification.
I use gimp and gimp doesn't even detect an Alpha channel in any of those but I installed Photoshop just too check and yeah the output is indeed correct, just the preview has changed. But I found another weird thing. This is the input, notice that "smudge" of color around the character.
This is the Output, this is the reason why I thought it was a problem with Alpha channel. But after opening the images above in Photoshop the alpha channel is indeed correct but the color channel's aren't.
@nagadomi さんが書いてくださったとおり、このソフト自体は意図した動作をしています。 また、完全に透明なピクセル(アルファ値が0)のある画像を変換すると、周りにノイズのようなものが乗るのは仕様です。 処理の都合上、不透明な箇所と透明な箇所の境界を引き延ばす必要があります。 さらに、処理の最初でRGBとAを掛けることにより、完全に透明なピクセルの値を0にしています。 なので、変換を行うとアルファ値が0のピクセルの内容は失われます。 仕様として「アルファ値が0のピクセルの内容は不定になる」と考えてください。
waifu2x-caffe and waifu2x(http://waifu2x.udp.jp) will break the RGB pixels in 100% transparent area. The behavior is by current design.
Ok thanks for all the info, I'll close the issue since it's not really an issue at all. Keep up the good work!
So i tried do Magnify a bunch of .bmp files but the output comes out with a messed up alpha channel. Just wanted to say thanks in advance and keep up the good work!