Welcome Guest! You need to login or register to make posts.

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: Member
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: Member, Administration, Moderator
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
Similar Topics
NEW: Photo Order 3.3.0 Plug-in for VirtueMart is now available (Photo Order for Virtuemart)
by p.shirykalova 10/11/2012 6:46:19 PM(UTC)
Popup Virtuemart Cart not taking timeout modify in Aurigma PHoto Order upload page (Photo Order for Virtuemart)
by marketson 5/11/2012 2:39:18 PM(UTC)
Facing Error in Photo Order Plugin for Virtuemart (Photo Order for Virtuemart)
by Nitingoyal 4/27/2012 4:03:51 AM(UTC)
Photo Order From Virtue Mart and Joomla 1.7 (Photo Order for Virtuemart)
by vbassini 2/26/2012 2:03:43 PM(UTC)
Photo Order Plugin runs on VirtueMart 1.1.8 (Photo Order for Virtuemart)
by martiki 2/3/2012 8:37:10 AM(UTC)
Cannot install Photo order on Joomla 1.5.23 (Photo Order for Virtuemart)
by fred974 1/18/2012 10:26:57 AM(UTC)
HOWTO: Add/remove attributes of product for Photo Order plug-in (Photo Order for Virtuemart)
by Dmitry.Obukhov 1/10/2012 12:07:58 AM(UTC)
Compatibility of VitrueMart photo order 2.1.1 and Internet Explorer 9 (Photo Order for Virtuemart)
by PhotosNickel 11/24/2011 7:58:59 PM(UTC)
Website exemple for Aurigma Photo order plugin for Virtuemart ? (Photo Order for Virtuemart)
by pixamedia 11/16/2011 1:49:27 AM(UTC)
NEW: Photo Order 3.1.0 Plug-in for VirtueMart is now available (Photo Order for Virtuemart)
by p.shirykalova 9/4/2011 10:15:43 PM(UTC)
Photo order (Virtuemart) + Image Flash Uploader (Upload CMS Plug-ins (Photo Order 2.x for VM, Drupa)
by Dexkz 7/8/2011 2:58:50 AM(UTC)
Photo Order Plugin for VirtueMart on Joomla for a real estate (Upload CMS Plug-ins (Photo Order 2.x for VM, Drupa)
by oanadeia 7/4/2011 10:04:55 AM(UTC)
German Translation for Photo Order plugin for Virtuemart (Upload CMS Plug-ins (Photo Order 2.x for VM, Drupa)
by andreym 4/21/2011 8:16:43 PM(UTC)
Photo Order Plugin - License Key Error (Upload CMS Plug-ins (Photo Order 2.x for VM, Drupa)
by jack1970 4/13/2011 10:08:45 AM(UTC)
Photo Order - Directory Permissions Issue (Upload CMS Plug-ins (Photo Order 2.x for VM, Drupa)
by jack1970 4/12/2011 1:51:16 PM(UTC)
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.