Coder Social home page Coder Social logo

Comments (17)

nodegin avatar nodegin commented on June 25, 2024

If I understand correctly you want to keep the edges crispy?
Why you not just resize it with PS / GIMP by Nearest Neighbor?

from waifu2x.

williammalo avatar williammalo commented on June 25, 2024

@nodegin that would make the image pixellated :)

from waifu2x.

Archeia avatar Archeia commented on June 25, 2024

This is also an issue for me as well. It was super fun converting old game assets that I had lost files over, but the sadness of making them transparent was :(

from waifu2x.

Saren-Arterius avatar Saren-Arterius commented on June 25, 2024

I think waifu2x is not good at pixelated image scaling...
Maybe you would want to try 2xSAI?

from waifu2x.

PwnicornDev avatar PwnicornDev commented on June 25, 2024

I can confirm this, it doesn't have to do with pixellation in the original.
In the first example, the edges are blurred where they are flanked by transparent areas. In the second example I added a white background prior to upscaling, resulting in perfectly clean edges.

1411945581847 7292df9f-ac9d-40fe-c0aa-e56ea5e29d97
1411945581847_ 6c18f7de-9a8f-4d45-cd52-db186355d56a

from waifu2x.

internetakias avatar internetakias commented on June 25, 2024

Not sure if this is worth mentioning, but earlier versions of waifu2x-caffee could produce transparent images with sharp edges.

from waifu2x.

PwnicornDev avatar PwnicornDev commented on June 25, 2024

@internetakias Do you know an exact version where it was working? If we can find the commit that broke it, we should be able to solve it easily.

from waifu2x.

internetakias avatar internetakias commented on June 25, 2024

@PwnicornDev
1.0.5 is the last version that produced scales with proper transparency.

from waifu2x.

internetakias avatar internetakias commented on June 25, 2024

Hey @nagadomi. You haven't replied to this issue yet, so I want to ask you what you think of this and if there's a way to fix it.

from waifu2x.

nagadomi avatar nagadomi commented on June 25, 2024

The latest version slightly improves for this issue but still not enough.
I think this issue is difficult to solve in various cases. (semi transparent or fully transparent, for white background color or black background color)
Sorry, I am pending it.

from waifu2x.

internetakias avatar internetakias commented on June 25, 2024

I understand. Thanks for replying and keep up the good work!

from waifu2x.

nagadomi avatar nagadomi commented on June 25, 2024

I fixed this issue. try http://waifu2x.udp.jp/

83d9f6de-1d55-4a43-ca9e-9c9da71e9353

from waifu2x.

andreili avatar andreili commented on June 25, 2024

Sory, reopen issue...
Original image with alpha-channel:
01-00-a00-007sek a
Upscaled image (x2, without denoise):
01-00-a00-007sek a
Transparent space become opaque, which increased the size.
The game has a lot of images, and this problem increases its size by 50-60Gb = /

from waifu2x.

nagadomi avatar nagadomi commented on June 25, 2024

How is waifu2x supposed to do?
I think it is problem of an original image that has unreasonably large transparent area.

EDIT: I understood what you said. I will fix it soon.

from waifu2x.

andreili avatar andreili commented on June 25, 2024

Unfortunately, it is a feature of the original game, and such areas should be.
Under the program - it does not have to process the field with 100% transparency. Now she treats them as a whole, which significantly increases the processing time:

./images/./Event01/01-00/01-00-A01/01-00-A01-015.PNG: 2.3339378833771 sec
./images/./Event01/01-00/01-00-A01/01-00-A01-015SET.A.PNG: 4.6067349910736 sec
./images/./Event01/01-00/01-00-A01/01-00-A01-015SET.B.PNG: 4.6801130771637 sec
./images/./Event01/01-00/01-00-A01/01-00-A01-015SET.C.PNG: 4.6291019916534 sec

(The first - the background, the rest - imposed on the background image with transparency, similar to the above).

from waifu2x.

nagadomi avatar nagadomi commented on June 25, 2024

I fixed that file size problem.
alpha_2x2

before fix: 740888 bytes
after fix: 37333 bytes

And, if image has alpha channel, 2x process time is required. alpha channel upscaling with waifu2x improves the upscaling result in some case.
see: https://twitter.com/mhhpnvu/status/673488043735539712

from waifu2x.

andreili avatar andreili commented on June 25, 2024

Yes, the local version has updated and checked.
Thanks for the quick response.

from waifu2x.

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.