Coder Social home page Coder Social logo

Comments (8)

lltcggie avatar lltcggie commented on July 25, 2024

再現しないので、Input.bmpをアップロードしていただけないでしょうか?
よろしくお願いします。

from waifu2x-caffe.

FlatCell avatar FlatCell commented on July 25, 2024

Sure here is the link to the file:
https://drive.google.com/file/d/0Bweq4bg_RcmCNTVoS0stVEl0VGM/view?usp=sharing

from waifu2x-caffe.

nagadomi avatar nagadomi commented on July 25, 2024

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:
r

G channel:
g

B channel:
b

A channel:
a

R+G+B:
rgb

R+G+B+A:
rgba

input.bmp.txt

from waifu2x-caffe.

nagadomi avatar nagadomi commented on July 25, 2024

BMP3 does not allow transparency
http://www.imagemagick.org/discourse-server/viewtopic.php?t=28733#p127820

Maybe browser/viewer follows the above specification.

from waifu2x-caffe.

FlatCell avatar FlatCell commented on July 25, 2024

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.
input
output 2

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.

from waifu2x-caffe.

lltcggie avatar lltcggie commented on July 25, 2024

@nagadomi さんが書いてくださったとおり、このソフト自体は意図した動作をしています。
また、完全に透明なピクセル(アルファ値が0)のある画像を変換すると、周りにノイズのようなものが乗るのは仕様です。
処理の都合上、不透明な箇所と透明な箇所の境界を引き延ばす必要があります。
さらに、処理の最初でRGBとAを掛けることにより、完全に透明なピクセルの値を0にしています。
なので、変換を行うとアルファ値が0のピクセルの内容は失われます。
仕様として「アルファ値が0のピクセルの内容は不定になる」と考えてください。

from waifu2x-caffe.

nagadomi avatar nagadomi commented on July 25, 2024

waifu2x-caffe and waifu2x(http://waifu2x.udp.jp) will break the RGB pixels in 100% transparent area. The behavior is by current design.

from waifu2x-caffe.

FlatCell avatar FlatCell commented on July 25, 2024

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!

from waifu2x-caffe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.