Why does this PNG file look so poorly when embedded as a resource in a Qt project?
Posted
by George Edison
on Stack Overflow
See other posts from Stack Overflow
or by George Edison
Published on 2010-05-05T17:29:35Z
Indexed on
2010/05/05
17:38 UTC
Read the original article
Hit count: 216
Here is the PNG file and what it looks like in a QWebView when accessed via http://sstatic.net/so/img/logo.png:
When accessed via HTTP:

<img src="http://sstatic.net/so/img/logo.png" width='250' height='61' />
When accessed via a resource:

<img src="qrc:/images/logo.png" width='250' height='61' />
As you can see, the only modification was the src attribute of the image tag... why the drop in quality?
Edit: The file is being shrunk via width: and height: in the style attribute, if that makes a difference. I updated the code.
© Stack Overflow or respective owner