AuthorTopic: graphics gale exporting png issue  (Read 15717 times)

Offline mattib

  • 0001
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile

graphics gale exporting png issue

on: June 26, 2012, 05:50:17 pm
I have this different sprites that I want to put in flash.
The thing I do is export them as png, different image for each frame. I set the alpha channel. The problem is that, when I import them into flash, instead of the background color, the black that i use on the charachter gets erased.
what should i do? thanks
« Last Edit: June 26, 2012, 06:17:29 pm by mattib »

Offline Pizza Tom

  • 0010
  • *
  • Posts: 224
  • Karma: +0/-0
    • @pizzadramon
    • pizzatom
    • View Profile
    • Blag

Re: graphics gale exporting png issue

Reply #1 on: June 26, 2012, 07:41:55 pm
I had this same problem when importing some pixels into Unity. It didn't like my magenta as transparency, so I could either use black (which is usually what programs use for transparent) or nothing. :/

The only fix I found was to open it up in Photoshop and manually delete the pixels I wanted transparent with a 1 px eraser. Wish I had a more solid workaround, but at least you should be able to get it to work that way (I assume any similar program will also work if you don't have access to PS)
pizzatom.tumblr.com
@pizzadramon

Formerly Regulus Awesome

Offline surt

  • 0011
  • **
  • Posts: 570
  • Karma: +0/-0
  • Meat by-product
    • not_surt
    • http://pixeljoint.com/p/2254.htm
    • View Profile
    • Uninhabitant

Re: graphics gale exporting png issue

Reply #2 on: June 26, 2012, 08:05:45 pm
In case you aren't aware, the image-level background colour isn't the transparent index. In GGale the transparent index is set per-frame in the frame properties.

If you already know that it could be that Flash/Unity ignore the index alpha entry in the PNG, it's possible that they just treat the first index as transparent, in which case you could just rearrange the palette to put the transparent colour at index 0.
« Last Edit: June 26, 2012, 08:23:45 pm by surt »

Offline mattib

  • 0001
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile

Re: graphics gale exporting png issue

Reply #3 on: June 27, 2012, 10:40:43 am
i think that it's the latter. How do I do that?

Offline mattib

  • 0001
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile

Re: graphics gale exporting png issue

Reply #4 on: July 01, 2012, 04:05:18 pm
bump?

Offline mattib

  • 0001
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile

Re: graphics gale exporting png issue

Reply #5 on: July 07, 2012, 08:21:39 pm
anyone?

Offline ptoing

  • 0101
  • ****
  • Posts: 3063
  • Karma: +0/-0
  • variegated quadrangle arranger
    • the_ptoing
    • http://pixeljoint.com/p/2191.htm
    • View Profile
    • Perpetually inactive website

Re: graphics gale exporting png issue

Reply #6 on: July 07, 2012, 08:45:50 pm
Google tells me that if you save the PNG as a 32bit one the alpha should be retained on import.
Ask Google and try what it tells you.
Google is your friend.
There are no ugly colours, only ugly combinations of colours.

Offline mattib

  • 0001
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile

Re: graphics gale exporting png issue

Reply #7 on: July 08, 2012, 01:11:22 pm
I am already searching on google but it's not that easy, I don't seem to find so many people with the same problem and often it isn't solved.
Nobody in this thread told me about the 32 bit thing, besides, when i save or export to png there are no options about the bits.

surt said this

" it's possible that they just treat the first index as transparent, in which case you could just rearrange the palette to put the transparent colour at index 0."

I just would like to know how to do this.
thanks
« Last Edit: July 08, 2012, 01:45:54 pm by mattib »

Offline Kasumi

  • 0010
  • *
  • Posts: 275
  • Karma: +1/-0
    • View Profile

Re: graphics gale exporting png issue

Reply #8 on: July 08, 2012, 02:03:04 pm
i think that it's the latter. How do I do that?
I know nothing about the specifics of this problem, but a free program called GrafX2 can swap palette entries if that's the problem.

Download it, and open each frame image and use the xSwap function.

GrafX2 isn't necessarily the most intuitive, so here's some steps:

1. Click the L. Find your image with the image editor and open it.
2. Click pal.
3. Click, palette entry 0. An arrow will appear to the left of it.
4. Mess around slightly with the values to confirm it's the color that's being made transparent instead. (If not the problem is probably something else)
5. If so, Click X-Swap and click any other unused color in the palette.
6. Click layers, check background, color 0, and resave your image.

But none of that will probably help if flash doesn't like indexed png images. If that's the case irfanview MAY help.

Open one of the images in question:
1. Image->Increase color depth. (If it's grayed out, this step is done. If it's not, you want 24bpp)
2. Save the image as png.
3. Check "Save transparent color" and try with and without "save transparency as Alpha Channel". (You probably want it with.) After you enter the filename, irfanview will let you click the color you want to be transparent.
4. Hope it works.
If it does, irfanview has some great batch processing which will allows you to do all these actions in one go. (Well, you'll still need to click the right transparent color for each image saved)

If neither of those things help, I don't know what to tell you since I don't own flash and can't really mess with it on my own.

But here's the link I think ptoing was referencing in case you haven't seen it: http://helpx.adobe.com/flash/kb/transparency-support-flash-professional.html

Edit: And it may be possible to do all this directly in graphics gale. It can create 24bpp images and has an option to make an alpha channel. But I'm not as familiar with it, so no steps from me on that. Also, I get the impression from your first post you already tried that.
« Last Edit: July 08, 2012, 02:28:11 pm by Kasumi »
I make actual NES games. Thus, I'm the unofficial forum dealer of too much information about the NES

Offline PixelPiledriver

  • 0011
  • **
  • Posts: 997
  • Karma: +6/-0
  • Yo!
    • View Profile
    • My Blog

Re: graphics gale exporting png issue

Reply #9 on: July 08, 2012, 02:30:07 pm
Got this to work:



This is with Flash CS3.
And knowing that it is, we seek what it is... ~ Aristotle, Posterior Analytics, Chapter 1