Build Your Own Arcade Controls Forum

Front End Support => MaLa Frontend => Topic started by: TheManuel on August 21, 2008, 09:07:21 am

Title: Problem snaps in MaLa - How to convert
Post by: TheManuel on August 21, 2008, 09:07:21 am
Last night I finally put my renamed (using fuzzyrenamer) console snapshots on my cab.
Scrolling through the NES list was making MaLa crash.  It was only happening with that emulator.  I took all the snaps from the snap folder and started adding them a few at a time until I finally caught one of the bad actors.  

It turns out the only difference between this snapshot and the previous fifty that worked is the color sampling.  This particular image is 32 bits whereas all the others where 8 bits.

All my Atari 2600 (go figure) and Nintendo 64 snapshots are 24 bits and those work fine.

Loadman: Is there a reason to believe 32 snapshots can be a problem?  I have MaLa running at 640x480x32 and the snapshot opens fine outside of MaLa.

When I get home tonight, I'll grab that snapshot and post it here.  It was really late so I did not have time to find other bad snaps but I'll do some more of that.

The snaps for all the other emulators seem to be fine.
Title: Re: May have found bug with snaps in MaLa
Post by: loadman on August 21, 2008, 07:19:16 pm
Hello,

The image handling is done by some 3rd party library code (to handling stretching/resizing/flipping) , but it would be great to know exactly what it's limitations are so I can look at alternatives or at least prevent a crash.

If you could post the snaps that cause a problem that would be good.

Thanks for testing
Title: Re: May have found bug with snaps in MaLa
Post by: TheShanMan on August 21, 2008, 09:53:31 pm
Hey Manuel (or loadman), why not test the theory by creating just a blank image in an image editor and save it as a 32 bit image with the name of a rom, and see if it crashes mala?
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on August 21, 2008, 10:00:18 pm
Alright, mate.

Here is a MaLa crashing snapshot.
I'll resample it to another bpp and then back to 32 to make sure it is not an artifice of the image software and report back.
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on August 21, 2008, 10:07:47 pm
Here is the information I get with GIMP on a file that crashes and one that doesn't.
The main difference is in the colorspace as mentioned before.
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on August 21, 2008, 10:12:16 pm
I'll give it a shot if I can figure out hot to do it.
I feel like a monkey playing with a cel phone.
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on August 21, 2008, 10:25:03 pm
So much for the theory.

I couldn't figure out how to make the file but remembered CPWizard does the alpha fade trick so I figured those were 32 bit images (alpha channel) so I grab one of those and that does not crash MaLa.

I'm not sure what could be wrong with those files. :-\
Title: Re: May have found bug with snaps in MaLa
Post by: SGT on August 21, 2008, 10:27:54 pm
I just tried a test with Photoshop.  I saved an image in RGB mode, 8 bit and it crashed Mala.  I saved the same image in Indexed Color mode and it works fine.  

This verifies the results that TheManuel had regarding the color space.  For those who don't know much about the difference between RGB (True Color) vs Indexed Color (which includes me), here's a link:

http://www.nyphp.org/content/presentations/GDintro/gd7.php
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on August 22, 2008, 08:55:15 am
SGT strikes again.
I would imagine then that the images in CPWizard's Media folder are 32 bit but indexed rather than true color? 
I'll check tonight when I get home because those did not crash MaLa.

Thanks for checking.
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on August 26, 2008, 10:53:05 pm
While on this subject, does anyone know of a tool to easily batch convert my NES snapshots from RGB to indexed color?
I know GIMP can do it but it uses some script-fu interpreter language for batch processing that looks extremely unwieldy.

Thanks.
Title: Re: May have found bug with snaps in MaLa
Post by: SGT on August 26, 2008, 11:25:59 pm
Do you have Photoshop?  You can record a macro ( they call it an action) and then tell Photoshop to perform the macro on each file in a folder:

http://www.webdesign.org/web/photoshop/miscellaneous/creating-actions-or-macros-in-photoshop.10738.html
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on August 27, 2008, 08:56:06 am
I have Photoshop Elements.  I hope the option is there as well.
I will look into it when I get home.

Thanks for the suggestion  :cheers:
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on August 27, 2008, 09:25:33 pm
Looks like I'm out of luck.
Apparently Adobe Photoshop Elements does not have that option.
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on August 27, 2008, 09:27:19 pm
Wait! I found this (http://graphicssoft.about.com/od/pselements/qt/actions.htm).
I'll report back.
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on August 27, 2008, 10:56:45 pm
The actions trick did not lead anywhere as it did not include batch processing.
However, through about.com, I found this nice piece of free software (http://pagesperso-orange.fr/pierre.g/xnview/enhome.html) which allowed me to convert all the files very easily with its built in batch processing feature.

It is very intuitive.
If anyone has a need to do this, let me know and I'll post some instructions.

Regards.
Title: Re: May have found bug with snaps in MaLa
Post by: loadman on August 28, 2008, 01:18:29 am
 :applaud:
Title: Re: May have found bug with snaps in MaLa
Post by: Chunce DeLeone on September 10, 2008, 01:21:11 pm
Hey Manuel, can you give directions, i can't find where to select the color mode in the batch processor.
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on September 10, 2008, 04:32:54 pm
Alright.
I'll post tonight when I get home and look at it.
Title: Re: May have found bug with snaps in MaLa
Post by: TheManuel on September 10, 2008, 10:14:25 pm
Got to Tools > Batch Processing

Browse for the folder with the files you want to convert using the "Add Folder" button.

Select an output folder different from the input folder just in case.

From the "Format" drop down menu, select the output format you want (.gif, .jpg, etc.).
I would choose the same format as the original images.

Here is the key part; go to the "Transformations" tab and from the "Convert" tree, select "Convert to Colours".
Click "Add" and some options will show up on the right pane.
Select 256 to have as many color combinations as possible.

When everything is set up, click "Go".

Let me know if it worked.


Title: Re: May have found bug with snaps in MaLa
Post by: Chunce DeLeone on September 11, 2008, 09:28:44 am
worked like a charm!  Thanks dude :applaud:
Title: Re: May have found bug with snaps in MaLa
Post by: illinifro on August 20, 2010, 05:17:00 pm
This was affecting me too, they were NES snapshots from the no-intro snapshot database.  Thanks for the info, worked great!
Title: Re: Problem snaps in MaLa - How to convert
Post by: Henrik68000 on September 18, 2010, 09:19:49 am
'IMAGE CONVERTER PLUS' IS A SPEEDY PROGRAM THAT CAN RUN TROUGH A COLLECTION OF PIC'S AND STREAMLINE THEM (iF YOU SET THE PARATMETERS IN THE PROGRAM (DONE IN A SNAP).
Title: Re: Problem snaps in MaLa - How to convert
Post by: IG-88 on January 03, 2011, 05:48:54 pm
Either one of you guys still have that link to the batch processing tool? The link seems to be gone in TheManuel's post
Title: Re: Problem snaps in MaLa - How to convert
Post by: IG-88 on January 03, 2011, 06:10:11 pm
Nevermind. Found this free program called FastStone Resizer that does the same trick. Took about a minute and a half.

http://tinyurl.com/268ar7j (http://tinyurl.com/268ar7j)
Title: Re: May have found bug with snaps in MaLa
Post by: danny_galaga on January 04, 2011, 01:29:03 am
I'll give it a shot if I can figure out hot to do it.
I feel like a monkey playing with a cel phone.

:duckhunt