[Tool]Snip'n'Stitch v4

Ask questions, discuss ideas, get answers
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: [Tool]Snip'n'Stitch v4

Post by Senshi »

I kind of gave up on working on this tool. Mostly because Java is surprisingly bad at handling large files due to the big limits in manually handling memory management, and I didn't find a good way to optimize image processing as well (=multithreading, segmentation). There also appears to be no good way to read only parts of the image file at a time for processing to ease up on memory load, which means there's currently no way around having the entire image sitting in the memory at some point in some weird bloated buffered image file type that is used by Java internally. This either crashes the app or causes the super slow pagefile swap on bigger images. The previous version without the preview image probably would manage your big file better, as the preview image(s) actually makes up most of the RAM usage.

TGA worked fine for my test runs, maybe it causes even higher memory usage so it glitches out on big files? Or it runs havoc due to 64bit or recent java updates?

This tool would be much easier to code with optimized speed and memory hanlding if done via C/C++, which I still haven't fiddled with. And as my coding motivation is always highly dependent on my current personal interests, I doubt I'll invest much more into this tool right now. Currently I'm focusing on a fairly advanced BF2 parser tool that allows easy visualization of core stats of mod/game assets (currently maps incl. minimap generation, weapons, kits are parsed, and I'm at ~50% of vehicles, materials and projectiles which are all kind of intertwined). I tailored it to create output that I can just copy&paste into my Project Reality wiki : http://www.wargamer-project.de/wgpwiki/PR .
Kind of a semi-auto wiki this way.
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: [Tool]Snip'n'Stitch v4

Post by Apache Thunder »

Yeah I got it to work for the file I wanted to use it on eventually. I just made the mistake of installing only the 32 bit version of Java, since I hadn't had Java installed prior to using this app and if this tool is run in the 32 bit version of Java then it won't open any files above 4096. 32 bit version fails to even open 8192x8192 res images which was something the old splitter could still handle.

When I attempted to use TGA files, it complained about unknown file type I think. TGA files also wasn't among the list of file extensions in the drop down menu for the file type nor in the open dialog. I had tried to manually force it to load tgas by specifying the file extension but this just results in it saying it doesn't recognize the file type when I try to open it. :(
ImageImageImage
I have cameras in your head!
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: [Tool]Snip'n'Stitch v4

Post by Senshi »

IIRC versions 1-3 could handle 8k images as well. The introduction of preview images ruined memory demand. Should be easy enough to make previews optional. If somebody wants to have a go at it and needs the source code, just contact me. Java isn't hard :P .
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: [Tool]Snip'n'Stitch v4

Post by fo0k »

The holy grail for me would be a splitter that can handle:

Larger than 32768x32768 16bit greyscale png/raw

I've probably mentioned before so won't hold my breath :)
Perhaps a new set of eyes will see this thread sometime to take it up again.
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: [Tool]Snip'n'Stitch v4

Post by Senshi »

Yeah, as said, better look for that in a C based language tool or a script, even. The task itself is fairly simple and should be a couple of kb of source code at maximum. You could even use a basic python script and image handling library. Even for a layman it's probably just a couple of hours of google research to whip something up.

Seriously, Python is easier than scripting BF42, so everyone here could do it.It just won't be me :) .
Post Reply