Link to home
Start Free TrialLog in
Avatar of MrFawlty
MrFawltyFlag for Belgium

asked on

VB.NET: Saving space by combining multiple pictures in one jpg

Hi,

I'm uploading a large number of pictures and need to minimize the size of the data that's being sent due to a limited connection.

I need code (compact framework) that takes a number of pictures, creates an empty bitmap of the appropriate size, places the pictures in such a fashion that when splitting the picture there are no problems, and saving the result as a jpg.

This jpg needs to be able to be split into its original "subpictures" when they arrive on the server via webservice.
ASKER CERTIFIED SOLUTION
Avatar of w00te
w00te
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
and sorry for saying C#, but it's the same in VB too, haha.  Just click the VB.net icon at the top of that link's code to switch it over to what you need :)  Sorry abou that.

-w00te
Avatar of MrFawlty

ASKER

Well the issue is the following:

I need to upload a large number of pictures from a mobile device, after each picture is successfully uploaded the local file is deleted. Now when 250+ pictures need to be transfered, this takes up a lot of time. If by creating a new picture out of 2-4 pictures the filesize is reduced 25%, this could mean 2-4MB less to be uploaded. The biggest limitation is the transferrate we're stuck with.

Please remember I'm working .NET Compact Framework v2.0 and not with .net framework v4.0
Avatar of Nasir Razzaq
Have you done any research which suggests merging 4 pictures will reduce the file size by 25%? I dont think it would. Is resizing pictures an option?
Hi,

Well my colleague told he performed several experiments concluding that this is the case. Advanced jpeg compressor does the trick but is costly, I would like to be able to achieve the same result by code.