Build Your Own Arcade Controls Forum

Front End Support => MaLa Frontend => Topic started by: jasonbar on August 03, 2009, 02:39:52 pm

Title: MaLa isn't showing transparency in PNG images :(
Post by: jasonbar on August 03, 2009, 02:39:52 pm
Howdy-

I realized the other day that all the extra FE artwork that I slaved over (hellooooo, tendonitis!) (http://forum.arcadecontrols.com/index.php?topic=92510.msg971449#msg971449) & for which I used transparent pixels on non-rectangular artwork, MaLa doesn't seem to display the transparency correctly.

Example file attached.  abcop control panel.  Rather than making all the background black, I made it transparent.  Looks fine in Windows Picture & Fax Viewer, as well as Photoshop.  But MaLa shows all the transparent pixels as white, which looks ugly on my layout.

Any ideas?

Thanks,
-J
Title: Re: MaLa isn't showing transparency in PNG images :(
Post by: drventure on August 03, 2009, 03:21:15 pm
Mala doesn't pay attention to the transparency layer (it'd be nice if it did, but that'd be a whole different feature.

Do this.

Make the entire background that you want transparent, purple (or some color that you DON'T need in the image).

then MAKE SURE that the bottom left or bottom right (I forget which so I usually do both) is THE SAME COLOR).

then whatever that color is, everywhere it is in the image, will be transparent.
Title: Re: MaLa isn't showing transparency in PNG images :(
Post by: jasonbar on August 03, 2009, 03:29:50 pm
Thanks--that sounds familiar--I believe I read about this some time ago but it didn't apply to me back then. :]

I need a bit of clarification, please.

Right now, in the abcop panel example above, the entire "background" of the cpanel image is transparent.  This includes the bottom left & bottom right pixels, as you can see.


Are you referring to the image that I use on my layout background?  *That* image must have a pixel in its bottom corner that matches the pixel color denoted as "transparent" in any of my panel/cab/etc pictures?


Thank you,
-Jason
Title: Re: MaLa isn't showing transparency in PNG images :(
Post by: fatfingers on August 03, 2009, 03:58:13 pm
OK, I think this is what you need to do.  First of all, the magic corner is the bottom-left corner.  I don't believe you can use transparency in a background image(??).  Instead, you can only have transparency in one of the user-defined objects in the layout.  When creating the image for that user-defined object the color that will become transparent should be the lower left color in the image as well as anywhere in the image that needs to be transparent.  Obviously this color can not be a color that needs to appear as normal in the image.  Once that user-defined object is created (and you check the checkbox that allows 'transparency' to be used) then the areas in the user-defined image that are the transparent color will now show the background image in those locations instead.

(Oh yeah, if you zoom way in on the 'transparent' image I think you'll see there's an off-by one error or something when computing the transparent area and you'll still see some pixels of the transparent color.  However, if you view it in normal scale those pixels disappear to the eye).

Wow, I'm not sure that's clear at all.

Good luck.

Title: Re: MaLa isn't showing transparency in PNG images :(
Post by: drventure on August 03, 2009, 04:40:09 pm
Sorry for the confusion.

Fatfingers is right. The background can't be transparent, but the user defined images can have transparency, but Mala doesn't honor the transparent layer.

Instead is uses that color mapping trick.
Title: Re: MaLa isn't showing transparency in PNG images :(
Post by: jasonbar on August 03, 2009, 04:52:57 pm
OK, between your helpful replies & skimming the wiki, I think I'm set.

The catch is that <1% of my images (my custom ones that I made) have this transparency in them.  Most of my stock images have black backgrounds--if MaLa tries to apply transparency to all those stock images, I think I'll get some awful unintentional transparency on many images.


I'll report back after dinking with it.

Thanks,
-Jason
Title: Re: MaLa isn't showing transparency in PNG images :(
Post by: drventure on August 03, 2009, 05:41:25 pm
Yeah, I'm running into that with a number of the cab images I've picked up.

They use BLACK as their background, but I want them transparent, so they end up looking oddly see through when I scan through the games. I've been fixing them as i go, changing all the black to almost but not quite black, and then erasing the background back to true black.

That way, if loaded in something other than MALA, the image still looks right, but in mala the background will go transparent.

But there are A LOT of cab images out there  :-\
Title: Re: MaLa isn't showing transparency in PNG images :(
Post by: jasonbar on August 29, 2009, 02:33:24 pm
Thanks, guys.

I finally got around to working on this again.

I succeeded in setting my control panel image in my layout to be transparent.  It does work as advertised, but, as mentioned above, there's a whole lot of cleanup involved in using transparency.  Too much work for me.

So, I went though my set of control panel images & made a new set that has black backgrounds instead of transparent ones.  I added them to my archive disussed in http://forum.arcadecontrols.com/index.php?topic=92510.msg971449#msg971449.

I'll be using black background control panel images for my FE (which is a little disappointing, but oh well...), but if somebody can still make use of the transparent ones, go for it.


Note that I don't show cab images directly in my MaLa FE, but I do show them in the info window, so I never went through the exercise of making transparent backgrounds for my custom set of cab images.


Thanks for your help!
-Jason