Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: slippyblade on August 07, 2015, 12:31:00 PM

Title: Need help with images
Post by: slippyblade on August 07, 2015, 12:31:00 PM
I've got everything working, AM is good, emulators are linked.  I'm having trouble with my layout images though.  On Windows it works fine.  On Linux, however, I can't get my PNGs to show up.  If I convert them to JPG they work, but I need transparency.

I'm attaching one of the layouts.  Could someone who knows more take a look and offer up some advice? 

Thanks!
Title: Re: Need help with images
Post by: omegaman on August 07, 2015, 04:33:49 PM
Slippy-

I just took a quick look at your layout and it looks OK, except that your fe.add_image is set to .jpg instead of .png. Unless, you changed it to .jpg to get it to work.   
Title: Re: Need help with images
Post by: slippyblade on August 07, 2015, 04:55:25 PM
Yeah, I was testing different formats.  It's weird, Attrac-Man works fine and it uses transparent PNG. For some reason mine don't work.
Title: Re: Need help with images
Post by: omegaman on August 07, 2015, 05:26:16 PM
I'll test it on my raspbian in a few minutes
Title: Re: Need help with images
Post by: slippyblade on August 07, 2015, 05:29:38 PM
Thanks.  I'm using Ubuntu on a normal PC though. Shouldn't make a difference either way.
Title: Re: Need help with images
Post by: omegaman on August 07, 2015, 06:32:28 PM
OK, I had the same issue when I loaded your layout. And, it turns out that your .png files didn't covert properly. So, I used image viewer in raspbian and saved the tv.jpg as a png and everything worked as it should. I know you said that you could view the files outside am fine, but that was the fix. It could have been a permissions issue with the file, who knows. Here, I am uploading the tv.png for you to test. I renamed it to tv2. Oh, the linux image viewer I used was GPpicView. Let me know...
Title: Re: Need help with images
Post by: akafox on August 07, 2015, 10:49:58 PM
You omega using linux?..coming over from the dark side you are..hmm...yes? ;)
Title: Re: Need help with images
Post by: omegaman on August 08, 2015, 03:42:57 AM
Fox-
Hey! I was just a little rusty. So, it was just like riding a bike.
Title: Re: Need help with images
Post by: verion on August 20, 2015, 06:23:00 PM
@slippyblade

There are two types (formats) of PNG files - both with .png extension:
PNG-8 with restricted color palette (aka "indexed color")
PNG-24 with full color palette

I've checked both files:
your original tv.png file was saved as PNG-8
and the one that omegaman saved was PNG-24 (which is usually the default format for image viewers and converters)

PNG-8 is not always supported - and it seems that this was your case.
Title: Re: Need help with images
Post by: slippyblade on August 20, 2015, 10:47:39 PM
That makes sense.  I was using Paint.NET and when you save it gives you a couple options 8 bit, 24 bit, 32 bit, and Auto.  I used the auto setting.
Title: Re: Need help with images
Post by: verion on August 21, 2015, 01:55:09 AM
Maybe "Auto" really means "give me the smallest file size" - and PNG-8 best for reducing file size. But it really matters for website graphics where you really want to shave off those  few extra kilobytes.

You should choose 24-bit (with transparency).