tags:

views:

132

answers:

2

Looking for a way to enable someone to upload a single file which will be series of image files (all gif) merged together as one big file. Here is what I need to do:

  1. Using VB6, want to merge the image files (potentially dozens of them) into a single file
  2. Upload file to a PHP Script (easy enough)
  3. Have PHP break apart the single file and write image files

I know how to handle the uploading of the file. I also know how to write the image files in PHP. What I am unsure of is the merging/un-merging operation.

In theory, I should just be able to use VB6 to merge all images using binary read/writing. However, does anyone know the series of binary codes that prefix each .gif file so PHP can pick up on that, or do I need to write some sort of binary separator in between each merged image?

I could surely tinker with this myself, but I thought some of you smarter-than-me coders may have already done this, and/or could provide a link, some code, or some 'things to consider'.

Thanks.

+5  A: 

Instead of merging/un-merging, if the whole purpose is to avoid overhead of sending dozens of files, why not zipping them and unzipping in PHP?

That should be far easier than the merging operation you're proposing.

Seb
That's a thought - any way to automate zipping up the images in VB6 then? Perhaps a way to automate the built-in zip application windows offers?
OneNerd
I'm not a VB6 guy, but Google says this: http://msdn.microsoft.com/en-us/library/aa719106.aspx :)
Seb
+2  A: 

Google is your friend :)

pix0r