Hello telerik team,
I am rad async Upload control...I loaded image but, I want to reduce pixel size ,i am uploaded picture how much width and height must and should ..I want to store image in the following pixel sizes "100 width *30 height " ....how reduce pixel size...provide some snippet to me.
<telerik:RadAsyncUpload runat="server" ID="ImgImages2" AllowedFileExtensions=".jpg,.jpeg,.png,.gif"
MaxFileInputsCount="1" Skin="Outlook" Width="350px" PostbackTriggers="PerformInsertButton" />
Insert()
byte[] fileData;
if (ImgImages.UploadedFiles.Count > 0)
{
UploadedFile file = ImgImages.UploadedFiles[0];
fileData = new byte[file.InputStream.Length];
string ImgFileName1 = ImgImages.UploadedFiles[0].FileName;
file.InputStream.Read(fileData, 0, (int)file.InputStream.Length);
if (fileData.Length > 1048576)
{
RadWindowManager1.RadAlert("The length of the uploaded file must be less than 1 MB", 300, 100, "Check SetUp Signature", null);
return;
}
//string ImgFileName = ImgImages.UploadedFiles[0].FileName;
oCheck.ImgFileName = ImgFileName1;
oCheck.Signature = fileData;
}
How reduce pixel size provide some snippet. and how to covert "radasyncfile.upload[0].file" to "Image " fro the above one.
I am rad async Upload control...I loaded image but, I want to reduce pixel size ,i am uploaded picture how much width and height must and should ..I want to store image in the following pixel sizes "100 width *30 height " ....how reduce pixel size...provide some snippet to me.
<telerik:RadAsyncUpload runat="server" ID="ImgImages2" AllowedFileExtensions=".jpg,.jpeg,.png,.gif"
MaxFileInputsCount="1" Skin="Outlook" Width="350px" PostbackTriggers="PerformInsertButton" />
Insert()
byte[] fileData;
if (ImgImages.UploadedFiles.Count > 0)
{
UploadedFile file = ImgImages.UploadedFiles[0];
fileData = new byte[file.InputStream.Length];
string ImgFileName1 = ImgImages.UploadedFiles[0].FileName;
file.InputStream.Read(fileData, 0, (int)file.InputStream.Length);
if (fileData.Length > 1048576)
{
RadWindowManager1.RadAlert("The length of the uploaded file must be less than 1 MB", 300, 100, "Check SetUp Signature", null);
return;
}
//string ImgFileName = ImgImages.UploadedFiles[0].FileName;
oCheck.ImgFileName = ImgFileName1;
oCheck.Signature = fileData;
}
How reduce pixel size provide some snippet. and how to covert "radasyncfile.upload[0].file" to "Image " fro the above one.