I need to write a method to turn the byte[] to .jpeg file and then zip these jpeg files.
I did some research but still couldnt figure it out. Thank you for your help.
code updated
Using Ionic.Zip;
public static void ZipJpeg(int ID)
{
ZipFile zip = new ZipFile();
Dictionary<int, byte[]> photos = new Dictionary<int, byte[]>();
photos = clientInfo_BL.GetByID(ID);
string fileName;
foreach(var p in photos.Values)
{
fileName = p.uploadDate.toString() + ".jpeg";
using(Image image = image.FromStream(new MemoryStream(p.ImageData)))
{
image.Save(fileName. ImageFormat.Jpeg);
}
Zip.AddEntry(image); // couldnt figure out this one
}
zip.save()//not sure if this one is right
return zip;
}