This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
sandeepsmx  
#1 Posted : Wednesday, February 25, 2009 12:54:48 PM(UTC)
sandeepsmx

Rank: Newbie

Groups: Guest
Joined: 2/25/2009(UTC)
Posts: 1

hi...
I would like to use the photo order. There is one thing i want to ask, how can we change the the size of the image uploaded. As i can see in demo that it is upload as it is. So is there any possible way to adjust the image size according to QualityMeterFormats t the client side.
Dmitry  
#2 Posted : Thursday, February 26, 2009 7:00:48 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Guest
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

As far as I understand you want to change thumbnail size according to size of the original image. Unfortunately you cannot get any data related to image size from quality meter nevertheless you can get size of the original image client-side in the script. So the scenario will be the following:
  1. You send each image in a single package
  2. Handle PackageBeforeUpload event
  3. Analyze image size there and change settings of a thumbnail.
Code:

//Create JavaScript object that will embed Image Uploader to the page.
var iu = new ImageUploaderWriter("ImageUploader1", 650, 400);

//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "./ImageUploader5.cab";
iu.activeXControlVersion = "5,7,24,0";

//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletJarFileName = "ImageUploader5.jar";
iu.javaAppletCodeBase = "./";
iu.javaAppletCached = true;
iu.javaAppletVersion = "5.7.24.0";

iu.showNonemptyResponse = "off";

//Configure appearance.
iu.addParam("PaneLayout", "TwoPanes");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowRotate", "false");
iu.addParam("BackgroundColor", "#ccccff");

//Configure thumbnail settings.
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1JpegQuality", "60");

iu.addParam("FilesPerOnePackageCount", "1");

//Configure URL files are uploaded to.
iu.addParam("Action", "ExtractFiles.aspx");


iu.addEventListener("PackageBeforeUpload", "ImageUploader_PackageBeforeUpload");
iu.writeHtml();

function ImageUploader_PackageBeforeUpload(PackageIndex){
	var width = getImageUploader("ImageUploader1").getUploadFileWidth(1);
	var height = getImageUploader("ImageUploader1").getUploadFileHeight(1);

	if (width > 500){
		getImageUploader("ImageUploader1").setUploadThumbnail1Width(500);
		getImageUploader("ImageUploader1").setUploadThumbnail1Height(350);
	}
	else{
		getImageUploader("ImageUploader1").setUploadThumbnail1Width(350);
		getImageUploader("ImageUploader1").setUploadThumbnail1Height(500);
	}
}


Edited by user Thursday, February 26, 2009 7:02:12 PM(UTC)  | Reason: Not specified

Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.