A member Spaces of the FilledContainer is the collection of the all spaces in a truck. An element Space presents one space in a truck. It gives you many number of members including BytesImage3D. It is the binary array to contain the graphics of the space in a truck. Please use the following ways to get a picture from BytesImage3D and save all the pictures of all spaces in a truck into your local computer. The pictures will be created in the in a folder with PNG format. Please don't forget to set true to ThumbnailsCreated member of Options to tell CubeMaster to create the pictures on the server side. Otherwise BytesImage3D will give you an empty return.

foreach (WebService.FilledContainer Container in LoadPlan.FilledContainers)
{
//Show the information of a filled container Container object
Console.WriteLine(Container.Name);
string outDir = @"c:\temp";//a folder where the pictures created
//Show the filled spaces in the FilledContainer object
foreach (WebService.SpaceInContainer Space in Container.Spaces)
{
if ((Space.IsEmpty == false) && (!string.IsNullOrEmpty(Space.BytesImage3D)))
{
//Show the information of the Space object
//Create a picture of the Space object to the outDir
byte[] bytes = Convert.FromBase64String(Space.BytesImage3D);
System.IO.MemoryStream ms = new System.IO.MemoryStream(bytes);
Image img = Image.FromStream(ms);
img.Save(outDir + Container.Name + Space.Sequence + ".png", System.Drawing.Imaging.ImageFormat.Png);
}
}
}
If you love action-packed shooting games, Mini Militia Mod APK is a perfect choice. Enjoy unlimited ammo, nitro, and unlocked weapons for non-stop battles. Play ad-free with enhanced controls and dominate the battlefield. Download now for the ultimate shooting experience!