+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  The best way for batch processing of graphics
Pages: [1]
Author Topic: The best way for batch processing of graphics  (Read 2 times)
Auryn
Guest
« on: January 31, 2010, 03:03:09 am »

Hi there,
I have a problem, there are tons of tools out there to extract/edit/insert graphics/tiles but they seem been created for 1 graphic at time....what if u have alot of graphics??
I have actually 2 project in mind; the first one is for psx:
1 file with 600 something TIM inside,
extracted with tim TimMultiRip, do i have to now convert all by hand??
At least a preview of the files in window would be help full even if it's still a looooong job to do.

The second project is even worse because of many things.
It's for NDS, 1 file with a pointer table and many single LZSS compressed graphics, none of this graphics in stored like they appear in the screen:

the most graphics on screen are like

ABCD              after decompressing they are stored as    AB
                                                                                  CD

or

ABC
DEF
GHI               after decompression i see them as A
                                                                      B
                                                                      C
                                                                      D
                                                                      ...

for a total of 3500 something graphics O.o

Sadly i lack on programming skills so my question is if there is a  "TimMultiRip" tool out there for the NDS that support LZSS compression with maybe a build in graphic converter and that can then put the file together again after the edit?Huh
I believe Pokemon games use such files too, no tools from that side??
What about the order of the graphics??
is there a Remapper /reorder for graphics of NDS with batch processing support??
It would even be ok if he work only in 1 way because the graphics are very simple (basically only windows with some text or some "logo" that have to be changed anyway).
Means i could create the translated graphics in png/bmp/etc.. from scratch already and i just need the program to remap /compress and insert in the big file.
Thanks for suggestions/tips/secrets  or maybe somebody is ready to create me such tools. Smiley :thumbsup:


Gemini
Guest
« Reply #1 on: January 31, 2010, 09:17:16 am »

Could you post a couple screenshots of the scrumbled graphics? As for the TIM batch convertion, that shouldn't be a problem to program. I could probably provide you with a fast converter.
Auryn
Guest
« Reply #2 on: January 31, 2010, 06:11:37 pm »

Here u go!
Title screeen from emulator:

This is the logo decompressed from the file
(yes, i didn't bother with paletts for now Tongue):

And one of the 3 text windows decompressed from the file
(yes, everything is graphic):


another screen from the emu:

the small buttons in the lower right corner from the file:


The 2 lines black window:

is probably stored like this in the file
(yes, I know it's not the right one like the screen,
lazy to browse 3527 pics to find the right one:p) :




The batch Tim converter would be awsome, there are 2-3 games that need that :p
Thanks
Rolen47
Guest
« Reply #3 on: February 22, 2010, 01:38:48 pm »

TimViewer can.
Auryn
Guest
« Reply #4 on: February 23, 2010, 12:48:43 am »

Thanks, I will try it out.
Karatorian
Guest
« Reply #5 on: March 07, 2010, 12:48:17 am »

For the NDS game, I may have a tool that can help you out. I wrote it to handle GBA graphics and It's got code to split images into tiles and vice versa. When it splits to tiles, it doesn't split the images into seperate files, it creates an image that looks just like the ones you've got.

Is there some sort of consistant pattern to the data? It looks the the examples you've given all use differing tile sizes. Also, there's really no way to know what size to make the reconstructed image. Unless you've got some way to know in advance, I don't think it could be fully automated.

Edit 1

So I ran your samples throuh my program. With the right settings, this is what I got.







Edit 2

I started thinking about why the game would possibly store it's images like that. I think they're all sprites.
« Last Edit: March 07, 2010, 03:38:34 am by Karatorian »
Auryn
Guest
« Reply #6 on: March 08, 2010, 12:49:08 am »

Wow! That's awsome  Shocked
No, if i remember well there is not pattern but they are at least groupped.
I belive that your program handle single image file only ...right??
If i get a multi extractor tool in my hands that extract the "scarmbled" images from the big file and it save it in single file (maybe giving a name like 32_img0001.ext where the 32 is the width of the descrambled image) then use your tool and we are half where there:p

I belive the biggest problem is the multi extract/insert from the big file to single files and opposite (it's 3527 images in that big file).
Somebody gave me the idea with photoshop scripts to automate the re-order of the image like your program do.
Anyway your program is welcome especially if he can handle multi images file.

Why the game store them like that?? If i remember well in some BG or in one of the rams, the ds can write max 8width at the time.
Anyway thanks
Karatorian
Guest
« Reply #7 on: March 08, 2010, 05:37:00 am »

Quote from: Auryn on March 08, 2010, 12:49:08 am
Wow! That's awsome Shocked
Well thank you.

Quote
No, if i remember well there is not pattern but they are at least groupped.
What do you mean they are grouped? Basically what I'm asking is if there was any way to know the size of chunks each file is split into without having to check each one by hand?

Quote
I belive that your program handle single image file only ...right??
Yeah, it was written to handle single images. However, it's a command line tool, so you can use a 'for' command in a batch file (or shell script) to handle multiple images.

Quote
I belive the biggest problem is the multi extract/insert from the big file to single files and opposite (it's 3527 images in that big file).
What sort of archive is it? If it's not too complicated, I may be able to come up with something.

Quote
Anyway your program is welcome especially if he can handle multi images file.
Alrighty, I'll package it up then. I wrote it for my own use and it hasn't been released yet.

Edit

I posted my program to my web page: http://static.karatorian.org/code/gba-pack/GBA-Pack-20100308.win32-bin.zip
« Last Edit: March 08, 2010, 10:29:41 am by Karatorian »
Auryn
Guest
« Reply #8 on: March 08, 2010, 05:27:26 pm »

For grupped i mean that there are maybe 50images width 24 then 30 width 12 etc..
but i don't think there is a way to check it automatically.

The compressed file should be something standart because I use NLZ-GBA to view them
http://www.romhacking.net/utils/529/

I uploaded the file (20MB) with all the images in it here:
http://membres.multimania.fr/auryntoo/nds/data.rar

I will go in holiday in 2 weeks for almost 2 months so if u want to come up with something, u have plenty of time :p

Anyway thanks for the tool and i will give it a try.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC