public void ResizeImage(String indexNo) { Student student = tableHelper.GetOneStudent(indexNo); if (student == null) { Trace.TraceInformation(String.Format("Student sa brojem indeksa {0} ne postoji!", indexNo), "Information"); return; } BlobHelper blobHelper = new BlobHelper(); string uniqueBlobName = string.Format("image_{0}", student.RowKey); Image image = blobHelper.DownloadImage("kontejnerk2", uniqueBlobName); image = ConvertImage(image); string thumbnailUrl = blobHelper.UploadImage(image, "kontejnerk2", uniqueBlobName + "thumb"); student.ThumbnailUrl = thumbnailUrl; tableHelper.AddOrReplaceStudent(student); }
public void ResizeImage(String indexNo) { StudentDataRepository sdr = new StudentDataRepository(); Student student = sdr.GetStudent(indexNo); if (student == null) { Trace.TraceInformation(String.Format("Student sa brojem indeksa {0} ne postoji!", indexNo), "Information"); return; } BlobHelper blobHelper = new BlobHelper(); string uniqueBlobName = string.Format("image_{0}", student.RowKey); Image image = blobHelper.DownloadImage("vezba", uniqueBlobName); image = ImageConvertes.ConvertImage(image); string thumbnailUrl = blobHelper.UploadImage(image, "vezba", uniqueBlobName + "thumb"); student.ThumbnailUrl = thumbnailUrl; sdr.AddOrReplaceStudent(student); }