Jump to content

PNG saved files with transparency get altererd (source: TGA)


Recommended Posts

If I load a TGA file with transparency, and save the file as a PNG without making any changes, the transparency color changes slightly.

Shouldn't the a PNG look identical to the TGA file? I only notice a change in quality with images that have transparency. This problem doesnt happen with Gimp or Photoshop.

Attached, you will find 3 images. If I save STT.TGA as a png, it will no longer look exactly like the source. How can I make paint.net convert this file without changing the original quality of the picture?

STT.TGA, after saved as a png (and/or saved back as a TGA), should have a transparent gradient which matches seamlessly with the original STLC.TGA.

Why does the transparent gradient get altered? How can I force Paint.net to convert an image without any change in the picture. Lossless to lossess conversion should be identical if done right. Again, it appears Gimp and Photoshop do this correctly.

Thanks,

Michael

Desktop.zip

Link to comment
Share on other sites

PS: In GIMP, if I save the file as TGA.. it will save it EXACTLY like the source. I choose the following options:

-No compression (no checkmark)

-Origin at bottom left (checkmark is checked)

PNG's are also messed up.

It doesnt appear Paint.net recognizes the full specs/attributes of TGA files; and doesnt load/save them (as TGA or PNG) correctly.

Link to comment
Share on other sites

Yes Paint.NET is still supported.

It just that (A) No one understands your problem, (B) Never seen the problem, or © Your not being clear enough on the problem.

For me it is all 3 of them. I don't understand the problem your having, your the 1st person I have seen report this problem and I been here since the year 2005, I also don't understand your 1st post and the layout of your images examples.

Sorry I can't be of any help to the problem but I do hope this post will help you help us understand the prroblem more.

Link to comment
Share on other sites

It looks like the attached zip file I provided was only accessed 3 times; 2 of them by me. I doubt if anyone would understand the problem without actually trying to to do what is described in my post with the attached images.

Bottom line is when you open these files and save them, they get changed to a TGA file thats not longer recognized by the below program anymore. This doesnt happen with Photoshop nor Gimp modified TGA files.

http://www.stardock.com/products/SkinStudio/

Link to comment
Share on other sites

I looked at the zip and I was sure they were the same files you posted over here viewtopic.php?f=12&t=24324.

I not to sure what going on with TGA. It a format I don't use. I have seen color problems with TGA files in Paint.NEt before and the only thing I can tell you to do is, make your images another format like PNG and use another program to convert them over to TGA. If you don't have another program that can do TGA there is a free image converting tool out there. I use it for textures in games as that what it was made for. It called DDS converter 2 and even though it was made to convert images to DDS it can also convert any image file type it supports to another image file type that it supports. EG: PNG to TGA.

Link to comment
Share on other sites

Right, I can use another converter. But the problem shouldnt be avoided in Paint.NET. The problem is 100% reproducable.

I looked at the zip and I was sure they were the same files you posted over here viewtopic.php?f=12&t=24324.

I not to sure what going on with TGA. It a format I don't use. I have seen color problems with TGA files in Paint.NEt before and the only thing I can tell you to do is, make your images another format like PNG and use another program to convert them over to TGA. If you don't have another program that can do TGA there is a free image converting tool out there. I use it for textures in games as that what it was made for. It called DDS converter 2 and even though it was made to convert images to DDS it can also convert any image file type it supports to another image file type that it supports. EG: PNG to TGA.

Link to comment
Share on other sites

Right, I can use another converter. But the problem shouldnt be avoided in Paint.NET. The problem is 100% reproducable.

I don't think it being avoided. For all we know better TGA support may be being looked at. I can't say it is or is not but you never know.

When your in Paint.NET go to help and then click about. Scroll down till you see this:

TGA File Format support code adapted from the CxImage library by David Pizzolato, http://www.xdp.it/cximage.htm.

Rick is working with what he got for TGA as far as I know (Don't take my word on that as only Rick can say for sure that he is still using David Pizzolato code). Any improvements to the code would be good but remeber he working with someone elses code for TGA. Also TGA is not used much here from what I seen so that means there less error reports on it. Less error reports means there less things to look into for it. You know the saying "Why fix it, if it not broken". Well if you don't know it broken then how can you fix it.

Link to comment
Share on other sites

Thanks so much for explaining Hitman. That makes a lot of sense that Rick just used code that has a problem with it. I'm hoping that this thread at least got Rick's attention and he's either fix the problem or find another place to get the code from. Even if TGA isn't too popular here, it appears to be the standard for the most popular software for Windows custom themes:

Skinstudio

Thanks again.

Right, I can use another converter. But the problem shouldnt be avoided in Paint.NET. The problem is 100% reproducable.

I don't think it being avoided. For all we know better TGA support may be being looked at. I can't say it is or is not but you never know.

When your in Paint.NET go to help and then click about. Scroll down till you see this:

TGA File Format support code adapted from the CxImage library by David Pizzolato, http://www.xdp.it/cximage.htm.

Rick is working with what he got for TGA as far as I know (Don't take my word on that as only Rick can say for sure that he is still using David Pizzolato code). Any improvements to the code would be good but remeber he working with someone elses code for TGA. Also TGA is not used much here from what I seen so that means there less error reports on it. Less error reports means there less things to look into for it. You know the saying "Why fix it, if it not broken". Well if you don't know it broken then how can you fix it.

Link to comment
Share on other sites

Thanks so much for explaining Hitman. That makes a lot of sense that Rick just used code that has a problem with it. I'm hoping that this thread at least got Rick's attention and he's either fix the problem or find another place to get the code from. Even if TGA isn't too popular here, it appears to be the standard for the most popular software for Windows custom themes:

Skinstudio

Thanks again.

Now now I never said he used code that don't work. All I am saying is there may be limitations to what can be done and how the code reacts. It not like he copy and paste the code into Paint.NET.

Link to comment
Share on other sites

Ohhh okay.. Sorry. Well, bottom line is paint.NET TGA doesnt seem to comply fully to TGA specs.... and hopefully Rick will make this work.

Thanks so much for explaining Hitman. That makes a lot of sense that Rick just used code that has a problem with it. I'm hoping that this thread at least got Rick's attention and he's either fix the problem or find another place to get the code from. Even if TGA isn't too popular here, it appears to be the standard for the most popular software for Windows custom themes:

Skinstudio

Thanks again.

Now now I never said he used code that don't work. All I am saying is there may be limitations to what can be done and how the code reacts. It not like he copy and paste the code into Paint.NET.

Link to comment
Share on other sites

Can you be more specific with what you mean by "the transparency color changes slightly" ? I'm on my MacBook right now, no access to Paint.NET itself -- imagine that! -- but I tried opening the TGA you posted and it looks like it's an 8-bit image. Paint.NET cannot save 8-bit TGA images, only 24- and 32-bit. To be honest, the 8-bit loading support has not been rigorously exercised. There was even a latent bug that was in the loader for over a year whereby the green and blue channels were being swapped and nobody even noticed! Talk about a combination of embarassing and edifying -- if nobody notices a bug, does it even exist?

The other thing that might be an issue is in the way that layer composition can affect changes from "literal" color values. As an example, one user had some frustration over the fact that any color with an alpha value of 0 was always saved with the R,G,B values set to zero as well, even if they were another value in the original file. The reason this happens is that, because of the way the math works and how images must be "flattened" before saving in any format other than PDN, all pixels with an alpha value of 0 literally lose all their "color" information once the go through the layer composition engine. (As a hopefully quick explanation at a higher level, all pixels with an alpha of zero are completely transparent, and thus their "color" information is actually superfluous -- it's like that pixel doesn't exist.)

This can also extend to pixels whose alpha is between 1 and 254. The R,G,B values may turn out to be different than you expect, although when they are contributing to a layered composition the result is equivalent. Because the image must be flattened before saving it (it goes through the layer composition engine even if there's only 1 layer), this transformation may occur.

Anyway all that explanation is just conjecture -- if you can give me a better description of the problem, even with screenshots and numerical pixel values, that can help me to figure out if this is a bug, a missing feature, or a mismatch of expectations (which can translate directly to a feature request, of course).

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...