Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: MaLa isn't showing transparency in PNG images :(  (Read 5932 times)

0 Members and 1 Guest are viewing this topic.

jasonbar

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2252
  • Last login:Yesterday at 07:40:40 pm
  • Dr. Inferno
    • The Infernolab
MaLa isn't showing transparency in PNG images :(
« 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

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:April 23, 2024, 06:53:06 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: MaLa isn't showing transparency in PNG images :(
« Reply #1 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.

jasonbar

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2252
  • Last login:Yesterday at 07:40:40 pm
  • Dr. Inferno
    • The Infernolab
Re: MaLa isn't showing transparency in PNG images :(
« Reply #2 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

fatfingers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 966
  • Last login:April 17, 2025, 05:26:08 pm
  • Got UltraStiks?™
Re: MaLa isn't showing transparency in PNG images :(
« Reply #3 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.

« Last Edit: August 03, 2009, 03:59:46 pm by fatfingers »
My DK low scores
-------------------
1) 180700
2) 165000
3) 162900
4) 162600
5) 158500


W.W.P.M.D.?                                       I'm here to help ... I just don't do it. ™

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:April 23, 2024, 06:53:06 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: MaLa isn't showing transparency in PNG images :(
« Reply #4 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.

jasonbar

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2252
  • Last login:Yesterday at 07:40:40 pm
  • Dr. Inferno
    • The Infernolab
Re: MaLa isn't showing transparency in PNG images :(
« Reply #5 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

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:April 23, 2024, 06:53:06 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: MaLa isn't showing transparency in PNG images :(
« Reply #6 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  :-\

jasonbar

  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2252
  • Last login:Yesterday at 07:40:40 pm
  • Dr. Inferno
    • The Infernolab
Re: MaLa isn't showing transparency in PNG images :(
« Reply #7 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