OT: Image Splitter

AlanC wrote on 11/20/2013, 1:34 PM
Because I couldn't find a simple, fast and free programme to split an image into any number of frames (tiles) I have created one myself.
Unfortunately it only works with jpg and bmp images but it is:
1) Simple.
2) Fast.
3) Free.
Just load the image that you want to split. Set the number of horizontal and vertical frames and within a few seconds it will create a series of BMP files numbered accordingly.

Alan



Download Image Splitter Rev 1.2 https://drive.google.com/file/d/0BwlQvJqYLlVvWkI0Wk1OX1BoUm8/edit?usp=sharinghere[/link]

Comments

Steve Mann wrote on 11/20/2013, 2:04 PM
I would like to try the program. Why not just post it here?
ushere wrote on 11/20/2013, 3:00 PM
free dropbox?
Steve Mann wrote on 11/20/2013, 10:31 PM
Got a "divide by zero" error when clicking on a jpg image. It could be the image but VLC displays it just fine.
TheHappyFriar wrote on 11/20/2013, 10:51 PM
Very neat, but it is a "little" buggy. :) But very neat.

I'd say the reason you have a hard time finding something like this is because normally it's the other way around, putting images together in to a single image (sprite sheets and the like).
AlanC wrote on 11/21/2013, 2:46 AM
"Very neat, but it is a "little" buggy."

What bugs are you seeing?
TheHappyFriar wrote on 11/21/2013, 6:21 AM
*if you accidentally select an image/etc. not supported, like a png, txt, etc., it gives an image not supported message and crashes (just click on one, not even double click).
*After I click "split image" it says "0 images have been save in", then I click OK, several times on a row. Seems to be based on the number of splits.
*After it tells me how many images it was split in to & I click OK (this is after the previous error), it says "Run-time error '340': Control array element '1' doesn't exist.
*Program closes after it's done running (not sure of that's a bug).

It does split the images, but those always happen, I tried it several times.
AlanC wrote on 11/21/2013, 6:38 AM
Thanks for that information. I'll fix those bugs later today and upload a new version. (I hadn't seen any of those bugs while testing but I hadn't tried selecting anything other than jpg's)
WillemT wrote on 11/21/2013, 7:00 AM
I tried it. I did not select any pictures other than jpg's, so I cannot comment on the crash for that.

It does split as requested without the split and writing errors as seen by TheHappyFriar. Seems to work OK.

Thanks
Willem.
TheHappyFriar wrote on 11/21/2013, 8:44 AM
I double checked, I still have the same specs that are in my profile.

I've had issues with software compiled on Win7/8. Never sure why and it's not all software, but when it wouldn't work that seemed to be the similar issue. All MSV Express editions I believe.
AlanC wrote on 11/21/2013, 8:58 AM
That version was compiled on a Win7 Pro 64 bit machine. I'll try compiling the next version in XP. Although some of the problems you had I can fix quite easily.
AlanC wrote on 11/21/2013, 11:02 AM
@ TheHappyFriar
As I thought, the filter should have prevented you from listing anything other than jpg's and bmp's so I don't know why you were able to list anything else. However, I have now trapped the possibility of that error occuring.

I don't understand why you were getting "0 images saved in". I've not been able to duplicate that.

You shouldn't have seen Control array element 1 doesn't exist but I've trapped that possibility anyway.

Edit: Forgot to mention, I compiled this version in XP Pro.
The program shouldn't close after it's done running. Perhaps that's as a result of the Error 340.

Thanks very much for the feed back. It's invaluable.

The latest version is available https://drive.google.com/file/d/0BwlQvJqYLlVvMF9TOVRrQlZ2SVU/edit?usp=sharinghere[/link]

Please report any further issues.

Alan
AlanC wrote on 11/22/2013, 4:48 AM
TheHappyFriar, have you had chance to test 1.1 yet? I'm interested to know if it's bug free.
Alan
PeterWright wrote on 11/22/2013, 5:06 AM
Hey Alan, what a great little program!
AlanC wrote on 11/22/2013, 6:07 AM
Thanks Peter. I trust you didn't experience any bugs?
PeterWright wrote on 11/22/2013, 6:27 AM
Not yet Alan - still playing ...
TheHappyFriar wrote on 11/22/2013, 6:42 AM
Just tested it. The thumb is nice and the error saying you didn't select an image is nice, but not displaying anything would be nicer. One less "ok" to click.

Still get the "0 images save in" message:
http://imageshack.us/photo/my-images/600/v9he.jpg/[IMG=http://imageshack.us/a/img600/7692/v9he.th.jpg][/link]

Besides that, works great now. Thanks. :)
AlanC wrote on 11/22/2013, 9:09 AM
@TheHappyFriar. I see you are running from within Documents and Settings\user\Desktop, so using XP, I tried running from the same location without any issues. I even downloaded the same image that you show in your example. Split it into 8 x 8 frames and didn't see a problem with that either. Then I noticed that the dialogue box in your screenshot looks like it's from Win 98, 2000 or even ME. I no longer have either of those versions so I'm unable to test it to that extent. What version of Windows are you running this on?
Also can you tell me if, despite the dialogue saying '0' images have been saved, do all images get created as expected?
Thanks again for your input.
Alan
TheHappyFriar wrote on 11/22/2013, 12:45 PM
Win XP SP3, yup.

Besides that dialog, it splits the image correctly. It did before too. I tried it on a couple images, that happened to be one that was handy for another test.
AlanC wrote on 11/22/2013, 12:48 PM
Thanks for the info.
O.K. I just put the finishing touches to 1.2. I have removed the dialogue so that's one button less to press. This version is cleaner and simpler and hopefully bug free.

Get it https://drive.google.com/file/d/0BwlQvJqYLlVvWkI0Wk1OX1BoUm8/edit?usp=sharinghere[/link]

Alan
Kit wrote on 11/22/2013, 8:00 PM
This is interesting. Is there any chance you could make it work with png files?
wwjd wrote on 11/22/2013, 8:07 PM
seems interesting, but what exactly is this used for? What does it do? or maybe, what does it do for video?
TheHappyFriar wrote on 11/22/2013, 8:47 PM
Now no dialog to say the images split, I like the noticed in the bottom of the program. :)

Byron K wrote on 11/23/2013, 12:44 AM
Thanks Alan! Neat little program.
AlanC wrote on 11/23/2013, 2:12 PM
@Kit, it's not impossible to make it work with PNG files but it would take quite a bit of coding and to be honest, for what I'm using it for it just isn't worth all that extra work.