hq2x executable that supports PNGs?

Place to talk about all that new hardware and decaying software you have.

Moderator: General Mods

Post Reply
Tallgeese
Justice is Blind
Posts: 620
Joined: Wed Jul 28, 2004 3:33 pm
Location: Test
Contact:

hq2x executable that supports PNGs?

Post by Tallgeese »

I'm mainly asking because I want to scale up a transparent PNG, and Targa transparency does not stick after hq2x'ing.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

i just save it to BMP with a specific colour as transparent placeholder, hq2x it up, and re-png-transparentize it. Takes a while per pic, but works.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Tallgeese
Justice is Blind
Posts: 620
Joined: Wed Jul 28, 2004 3:33 pm
Location: Test
Contact:

Post by Tallgeese »

I tried that, but it gives me Ye Olde Ghost Border of Doom.

Oh well, no big deal.
mudlord
has wat u liek
Posts: 559
Joined: Tue Sep 11, 2007 2:54 pm
Location: Banland.

Post by mudlord »

Metatron,

Since you wanted a HQ2X executable that supports PNG, I went ahead and made one:

http://vba-m.ngemu.com/hq2x_freeimage.rar

Let me know how that goes.
Tallgeese
Justice is Blind
Posts: 620
Joined: Wed Jul 28, 2004 3:33 pm
Location: Test
Contact:

Post by Tallgeese »

Oh, it only outputs PNG or does it take it as input?

Thank you very much for trying, but it seems the PNGs it outputs can;'t be read by Photoshop for some reason?

See, the whole reason I asked was so I could upscale images with transparent backgrounds. If you send TGAs through it, hq2x mangles the alpha channel. But again, thanks for trying.
mudlord
has wat u liek
Posts: 559
Joined: Tue Sep 11, 2007 2:54 pm
Location: Banland.

Post by mudlord »

Oh, it only outputs PNG or does it take it as input?

Thank you very much for trying, but it seems the PNGs it outputs can;'t be read by Photoshop for some reason?
Yes, it should output PNGs while preserving the BMP's content as much as possible. It uses standard FreeImage API calls for this, so its not complicated at all.

Its very strange that the PNGs don't open in Photoshop for you. What version of Photoshop are you using?
Tallgeese
Justice is Blind
Posts: 620
Joined: Wed Jul 28, 2004 3:33 pm
Location: Test
Contact:

Post by Tallgeese »

Photoshop CS.

Also, I think you misunderstood what I was doing... I was starting with a transparent PNG and trying to hq2x it, because if I take a BMP and use it, the background and the thing I'm trying to extract blend in, and deleting the background leaves some junk around the image that is annoying. But then I found out that hq2x doesn't take PNGs as input.

So what I did was surmise that I could take a TGA, add an alpha channel, and hq2x that. It 'worked' in a sense... except hq2x mangles the alpha channel so I might as well have used BMP.

Oh well, I doubt it'd work correctly anyway, even if it did take PNGs as input. It'd probably make the outer edges semitransparent or something. As I said, thanks for trying! Scale2X does the job, I just find hq2x more pleasant usually.
Truth Unknown
Regular
Posts: 271
Joined: Tue Jun 14, 2005 8:35 pm

Post by Truth Unknown »

Try spitting the image up into two parts RGB and Alpha, HQ2X-fy them and mask the Alpha over the RBG or something to that effect. My memory is fuzzy on the masking method but I think you can figure that out.
Tallgeese
Justice is Blind
Posts: 620
Joined: Wed Jul 28, 2004 3:33 pm
Location: Test
Contact:

Post by Tallgeese »

Truth Unknown wrote:Try spitting the image up into two parts RGB and Alpha, HQ2X-fy them and mask the Alpha over the RBG or something to that effect. My memory is fuzzy on the masking method but I think you can figure that out.
I tried that already, actually. HQ2X mangles the alpha.
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

You saved the alpha channel to a greyscale 8-bit bitmap and applied the filter to it separately?
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Tallgeese
Justice is Blind
Posts: 620
Joined: Wed Jul 28, 2004 3:33 pm
Location: Test
Contact:

Post by Tallgeese »

Ohhh... well that I didn't do. I'll try it sometime, that'll be interesting...

It's a hilarious coincidence that it is your tool I used to get the original image in question.
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

:)
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Post Reply