Build Your Own Arcade Controls Forum

Front End Support => MaLa Frontend => Topic started by: Dustin Mustangs on September 08, 2007, 12:15:47 am

Title: Mala Transparency Help
Post by: Dustin Mustangs on September 08, 2007, 12:15:47 am
I can't seem to get transparency to work for my snaps (the only place I'm trying to use it).  I'm doing the bottom left corner thing and using jpg's.  The snaps show up in mala but the transparent color is still visible.  I've attached one as an example. 

Is there some trick to this that I'm missing?  Am I using the wrong format??  Is U of M going to loose again tomorrow today???

 :cheers: 
Title: Re: Mala Transparency Help
Post by: Katana Man on September 08, 2007, 12:43:37 am
I found that .png worked much better.  Of course, I'm sure you know, but in the layout editor, you have to double click the image and checkmark transparency.
Title: Re: Mala Transparency Help
Post by: Dustin Mustangs on September 08, 2007, 06:29:59 am
Oh, don't be so sure.  I'm not sure I checked that, lol.  I figured it was something stupid I was missing.  I tried pngs already so I'm pretty sure that's prob it.  I'll check it out later.  Thanks for the clue, I needed one!

 :dizzy:
Title: Re: Mala Transparency Help
Post by: Dustin Mustangs on September 10, 2007, 03:57:56 pm
Hmmm, I found and checked that box and it still isn't working.  I changed the snap background to match the layout background to get around it for now, but I'm all ears if someone has something else for me to try.
Title: Re: Mala Transparency Help
Post by: Katana Man on September 11, 2007, 05:37:03 pm
Have you tried with .png images yet?
Title: Re: Mala Transparency Help
Post by: headkaze on September 11, 2007, 05:55:40 pm
Bottom line is jpegs don't have an alpha channel. Use png's. But even then you will have to load up the image into a paint program like Photoshop and make the background transparent. How do you recognise a true alpha channel/transparent background in Photoshop? It looks like little light/dark gray squares in a grid.

Even batch converting a bunch of jpegs to png won't magically create an alpha channel for you. I have always been on the look out for a program that will replace the background colour with an alpha transparency. While there are plugins for Photoshop and even Gimp can do "replace color with alpha" they replace either black or white with alpha in the entire image. So the result is an image that is see through rather than an replacing the background color with alpha only. Still looking for that program!
Title: Re: Mala Transparency Help
Post by: shock_ on September 11, 2007, 07:17:26 pm
Mala doesn't use alpha transparency; in fact, it can make matters worse. 

I'll try and take a look using that image you uploaded in the first post and get back here with some answers.
Title: Re: Mala Transparency Help
Post by: Katana Man on September 11, 2007, 07:52:11 pm
Yeah, I was gunna say...  I didn't have to do that kind of photoshop work to make transparencies work in Mala, thankfully. Mala identifies the color in the bottom left pixel. Then wherever else it appears, it will make it transparent. 
Title: Re: Mala Transparency Help
Post by: headkaze on September 11, 2007, 08:22:53 pm
I was gonna say Mala uses GDI+ and dealing with alpha channel graphics in that is slow. And I remember Swindus saying that he didn't support alpha channel graphics.

So Swindus must use some custom colour keying code instead. Still with jpegs you will have problems with the compression artifacts caused by it's algorithm. You don't get large chunks of single colour like you do with indexed gif's or png's. I would say save to indexed 256 colour png format, that way your background colour will be one set colour. You may get some horrible artifacts around the edges though. I'm not sure how Swindus deals with colour keying in Mala though. The best way to make a transparent background with colour keying is to delete the background manually, then create a nice "outter glow" using a colour near the background colour (just a few values above black for example) in photoshop to create a nice solid outline. That way you will get less ugly looking jaggies around the edge.
Title: Re: Mala Transparency Help
Post by: Dustin Mustangs on September 12, 2007, 08:18:33 am
Thanks for all the thoughts on this.  I know I tired the png but that was before I was clued in about the setting in mala.  I'll give them a try again and see if that does it. 

The little workaround I tired works great, but I'd like to make a set that will work with future layouts too so I don't have to make a new set of sanps for every set of layouts I come up with.

I'm interested to hear what you come up with shock, if I don't have luck with those png's I'll upload one of them too.

Thanks

 :cheers:
Title: Re: Mala Transparency Help
Post by: shock_ on September 12, 2007, 08:19:40 am
Here's your answer - that image is crap.  :)

It has a thin (1 pixel) border running all the way around it.

See the attached zoom.

Transparency is working fine - just only in the very corners!
Title: Re: Mala Transparency Help
Post by: Dustin Mustangs on September 12, 2007, 08:27:17 am
Hmmm, that's weird.  To make these I started a new doc in ps, added a new layer, filled it with my 'transparent color', and then dragged in my console pic layers from another psd.  Do you know where this border came from or how I'd get rid of it?  I'm a little lost here...

Thanks again for the help!

 :notworthy:
Title: Re: Mala Transparency Help
Post by: shock_ on September 12, 2007, 08:53:31 am
Sorry I got no idea - your method sounds okay to me. 

I usually do things the other way though - isolate the image over a transparent background first, then add a new layer (ctrl-shift-N), then fill with uniform colour (Shift-F5), then drag it below the foreground layer, then save for web.

All I can suggest is keep an eye on the borders at every single step of the way and see where it's introduced.   Especially if you crop the final image down at the end.
Title: Re: Mala Transparency Help
Post by: Katana Man on September 12, 2007, 02:06:24 pm
This happened to me once.  I don't know why.  I had to fill the background twice to get it to fill properly.
Title: Re: Mala Transparency Help
Post by: Dire Radiant on September 12, 2007, 10:28:37 pm
This made me scratch my head too. Couldnt think of anything. Then tonight I was playing with some CPO images and I ran into the same problem.

What's happening is youre cropping an image to a rectangular selection and your selection is antialiased. So when you crop it, it's antialiasing itself to your background colour! (looks like yours was probably white) To get around it, either:

1.turn off antialiasing for the selection tool

or

2. select that grey you have there as your background colour in photoshop.
Title: Re: Mala Transparency Help
Post by: shock_ on September 12, 2007, 11:10:50 pm
Yeah that definitely makes sense.  :applaud:
Title: Re: Mala Transparency Help
Post by: Dire Radiant on September 12, 2007, 11:24:53 pm
It's very easy to spot what's happening when your background colour happens to be set to bright red like mine was tonight  ;D
Title: Re: Mala Transparency Help
Post by: headkaze on September 13, 2007, 03:08:13 am
All I can suggest is keep an eye on the borders at every single step of the way and see where it's introduced.   Especially if you crop the final image down at the end.

I don't think it's cropping that causes the border around the edge. I've seen this before and it's caused by the scaling alg when you make an image smaller.