jutretel / hqx

Automatically exported from code.google.com/p/hqx
GNU Lesser General Public License v2.1
0 stars 0 forks source link

png transparency not supported (lost in output) #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. have a png image with transparency (say a round emoticons face)
2. hqx -s 2 input output

What is the expected output? What do you see instead?
I expected the image scaled with transparency preserved
transparent area of input is now white

What version of the product are you using? On what operating system?
kubuntu 10.4
devil 1.7.8 (from source)
hqx 1.0 (source package)

Please provide any additional information below.

Original issue reported on code.google.com by mig33.ti...@gmail.com on 29 Oct 2010 at 2:38

GoogleCodeExporter commented 8 years ago
sorry, I attached the first icon in my folder without thinking. I'm not angry 
:D, attached below is another more neutral one :)

Original comment by mig33.ti...@gmail.com on 29 Oct 2010 at 2:44

Attachments:

GoogleCodeExporter commented 8 years ago
Looks like the code for hqx drops the alpha bit because of RGBtoYUV conversion. 
(hqx.c)

Original comment by d13...@gmail.com on 27 Nov 2010 at 4:42

GoogleCodeExporter commented 8 years ago
Any chance this will be fixed in the future? I need my sprite's border to 
antialias against a transparent background and not some arbitrary color. So 
preserving the alpha channel is important for me...

Original comment by buschn...@gmail.com on 21 Jan 2011 at 7:58

GoogleCodeExporter commented 8 years ago
Yes please fix, need alpha! Thanks!

Original comment by akasurr...@gmail.com on 16 Feb 2011 at 5:39

GoogleCodeExporter commented 8 years ago
I added transparency handling to this code. It works for me (Debian x64), 
though I didn't test it very much. You can download the source code here: 
http://bitbucket.org/Mytskine/hqx/downloads

@comment 1: your smiley has no transparency! But I stilled used it for my tests 
after using Gimp to turn white into alpha.

@comment 2: Here there's no "alpha bit", but an alpha byte (8 bits). And the 
RGBtoYUV conversion isn't the only problem, so the main changes where not in 
"hqx.c".

Original comment by mytskine on 20 Feb 2011 at 11:36

GoogleCodeExporter commented 8 years ago
Thank you! After some hacking I got it working on windows using MSVC2010.

Original comment by buschn...@gmail.com on 24 Feb 2011 at 11:13

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
For the people (like me) who have a result that is blocky at the borders, the 
alpha channel alone is not enough. Also color the R, G and B channels 
appropriately to get a nice border.

Original comment by tombosho...@gmail.com on 25 Apr 2011 at 7:38

GoogleCodeExporter commented 8 years ago
Yes I would love to support alpha. @mytskine can you supply me with a patch of 
the changes you have made?

Original comment by grom...@gmail.com on 1 Dec 2011 at 11:05

GoogleCodeExporter commented 8 years ago
Integrated changes by mytskine

Original comment by grom...@gmail.com on 5 Dec 2011 at 6:05