Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

unwanted halos in png files
Started by willsingleton Jan 22 2010 03:36 PM

- - - - -
18 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

willsingleton

[GLOBAL: userInfoPane.html]
willsingleton
  • Enthusiast

  • 55 posts
  • Corona SDK

I am having a problem with png files that have very soft transitions into transparency - they have unwanted dark halos where it transitions.
I'm using Photoshops "Save for Web & Devices" with a PNG-24 transparency. It looks fine in Photoshop and on a Browser, but halos appear in Corona. Anyone else having this problem?
uid: 2862 topic_id: 410 reply_id: 300410


[TOPIC: post.html]
#2

aonyn

[GLOBAL: userInfoPane.html]
aonyn
  • Observer

  • 23 posts
  • Guests

Hi willsingleton.

Try changing the Matte color in the "Save for Web & Devices" dialog.
For png-24, you will see it next to the transparency and interlaced check boxes.
If you problem is a dark halo, perhaps use a lighter color as close as possible to the background the image will displayed over.
Perhaps even try to select none for matte.

I can't say with 100% certainty that this will solve your issue, but it is worth looking at based on what you describe.
I hope this helps.

regards,
Dave
uid: 3948 topic_id: 410 reply_id: 760


[TOPIC: post.html]
#3

willsingleton

[GLOBAL: userInfoPane.html]
willsingleton
  • Enthusiast

  • 55 posts
  • Corona SDK

Thanks Dave - I'll try that & I'll post it here if it works.
uid: 2862 topic_id: 410 reply_id: 761


[TOPIC: post.html]
#4

Lucija Kordic

[GLOBAL: userInfoPane.html]
Lucija Kordic
  • Observer

  • 8 posts
  • Guests

I had the same halo issue with a lighter blue and orange color when exporting a png 32 from Fireworks CS4. Exporting a png 24 gave me weird gemoetric shapes in preview--I'm guessing from masks used in my file. A deeper green and indigo color worked fine.
uid: 3128 topic_id: 410 reply_id: 764


[TOPIC: post.html]
#5

Guest__*

[GLOBAL: userInfoPane.html]
Guest__*
  • Guests

The matte thing is a problem though if your background fades out and/or isn't a solid color. Unless I'm understanding you wrong. Also, you can't set the matte color without loosing transparency from what I can tell.
uid: 0 topic_id: 410 reply_id: 766


[TOPIC: post.html]
#6

aonyn

[GLOBAL: userInfoPane.html]
aonyn
  • Observer

  • 23 posts
  • Guests

That is true, when using a matte color, it will apply the color behind partially masked pixels.

However, in photoshop's "save for web or device" dialog, there is a matte setting "none" which also is not the default setting, it must be selected by the user.

So there are two possiblities which may solve his problem, a matte selection which blends smoothly with the app background, or explicitly defining the matte as "none". Either possibility will lead him to the same setting combo box within the exporter he is using.

Honestly, I don't know why adobe does not default to "none", to me it would make more sense for general usage of transparent png.

regards,
Dave
uid: 3948 topic_id: 410 reply_id: 767


[TOPIC: post.html]
#7

willsingleton

[GLOBAL: userInfoPane.html]
willsingleton
  • Enthusiast

  • 55 posts
  • Corona SDK

Thanks for all the input. I have a background with different colors, but following your suggestions, I tried the matte set to a color, then I tried setting the matte to none, and I also tried using SuperPng - but I still get the same halo. It looks ok in Photoshop and the browser, but has the halo when I view in Corona and my iTouch. I'm going to try it all in Flash next and see if I get the same halos.
uid: 2862 topic_id: 410 reply_id: 769


[TOPIC: post.html]
#8

aonyn

[GLOBAL: userInfoPane.html]
aonyn
  • Observer

  • 23 posts
  • Guests

No problem,

Btw, I recall having a similar problem once, different environment, but still with png transparency from photoshop.
I was able to fix it then easily by opening and resaving in gimp.
It has been a while, but iirc, there was a setting in the gimp png export dialog something to the effect of ' save background color'.
Leave this option off, and this may fix your problem.

Sorry this fix involves working outside photoshop, but like I said, it helped me in the past with a similar issue, and hopefully it helps you as well.

Here is a link to gimp in case you don't already know of it.
http://www.gimp.org/

Hope this helps.

regards,
Dave
uid: 3948 topic_id: 410 reply_id: 770


[TOPIC: post.html]
#9

aonyn

[GLOBAL: userInfoPane.html]
aonyn
  • Observer

  • 23 posts
  • Guests

One question, does your source .psd file use a layer mask, and does this layer mask remove a dark background?

The reason I ask this is, on thinking about when I had this issue, I was masking a rendered output from modo, which I had rendered on a black background, and a separate layer rendered alpha, which I used for my mask.

This is only a thought, but if you are using a similar layer mask for your transparency, perhaps this is a common link.
If this is the case, perhaps merging this layer to another blank layer, thereby getting rid of the layer mask (by making the transparency permanent) could solve this issue.

Again, this is only a thought, but perhaps worth checking.
If this turns out to be the case, please let me know, I am curious if this is the case.

regards,
Dave
uid: 3948 topic_id: 410 reply_id: 772


[TOPIC: post.html]
#10

willsingleton

[GLOBAL: userInfoPane.html]
willsingleton
  • Enthusiast

  • 55 posts
  • Corona SDK

hmmm ...never heard of gimp - I'll check it out - Thanks.
My PS files are layered, but there are no masks, just very subtle transitions from color into transparency.
uid: 2862 topic_id: 410 reply_id: 773


[TOPIC: post.html]
#11

willsingleton

[GLOBAL: userInfoPane.html]
willsingleton
  • Enthusiast

  • 55 posts
  • Corona SDK

Here is what I found:
the png files are Ok - they look fine in Photoshop, AND in Flash, but when I put them in Corona the halos appear! So the problem is in Corona somehow. Is there some sort of compression in Corona that is adding the halos? I have screen captures of the exact same png file in Corona and in Flash, and there is a very visible difference.
uid: 2862 topic_id: 410 reply_id: 780


[TOPIC: post.html]
#12

aonyn

[GLOBAL: userInfoPane.html]
aonyn
  • Observer

  • 23 posts
  • Guests

Unfortunately I can't help you there, I am only a user, so I can't comment on how Corona handles the file.

I would suggest still trying to resave the file in gimp and see if it helps.
There seems to be a difference in the way gimp and photoshop format the file, from my past experience.

Anyway, I do hope you find a solution and please post back when you do.
I wish I could be more help for you :)

regards,
Dave

uid: 3948 topic_id: 410 reply_id: 782


[TOPIC: post.html]
#13

willsingleton

[GLOBAL: userInfoPane.html]
willsingleton
  • Enthusiast

  • 55 posts
  • Corona SDK

Thanks Dave. Carlos tells me that " This is a weird graphics bug that is manifested by photoshop and there are tons of articles on it on the web on how/why/etc it happens. It is an opengl issue with the iPhone and the way the png file is constructed." So I googled it and sure enough it seems to be a opengl problem, but he told that the Ansca team is working on it. I'm gonna take a look at gimp in the meantime.
uid: 2862 topic_id: 410 reply_id: 788


[TOPIC: post.html]
#14

Lucija Kordic

[GLOBAL: userInfoPane.html]
Lucija Kordic
  • Observer

  • 8 posts
  • Guests

Seems like Fireworks CS4 can be added to the known issue.
uid: 3128 topic_id: 410 reply_id: 790


[TOPIC: post.html]
#15

aonyn

[GLOBAL: userInfoPane.html]
aonyn
  • Observer

  • 23 posts
  • Guests

OK, thanks for the update from Carlos.
At least it is a known issue, so we can hope a fix is inbound.

Good luck, hopefully Gimp will be a good workaround for you in the meantime.

regards,
Dave
uid: 3948 topic_id: 410 reply_id: 794


[TOPIC: post.html]
#16

carlos m. icaza

[GLOBAL: userInfoPane.html]
carlos m. icaza
  • Corona Geek

  • 2,992 posts
  • Alumni


We are actually looking at this today and we will have an update for all of you as soon as we can.

Carlos
uid: 24 topic_id: 410 reply_id: 817


[TOPIC: post.html]
#17

willsingleton

[GLOBAL: userInfoPane.html]
willsingleton
  • Enthusiast

  • 55 posts
  • Corona SDK

I just downloaded the Corona SDK 1.1 and the halo problem has been fixed!
The png files look absolutely beautiful - no halos - it works perfect now!
Many Thanks to the Ansca staff!!!
uid: 2862 topic_id: 410 reply_id: 872


[TOPIC: post.html]
#18

aonyn

[GLOBAL: userInfoPane.html]
aonyn
  • Observer

  • 23 posts
  • Guests

Glad to hear it willsingleton! :)

Thanks also Ansca.
I downloaded and read the new documentation last night, and I am looking forward to playing with the new version today.

regards,
Dave
uid: 3948 topic_id: 410 reply_id: 873


[TOPIC: post.html]
#19

Lucija Kordic

[GLOBAL: userInfoPane.html]
Lucija Kordic
  • Observer

  • 8 posts
  • Guests

I just downloaded the new version after reading Will's post and the halos are indeed gone. Yay! Thanks Carlos & all.
uid: 3128 topic_id: 410 reply_id: 876



[topic_controls]
[/topic_controls]