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

Notification

Icon
Error

Options
Go to last post Go to first unread
Albertvdmeulen  
#1 Posted : Sunday, March 22, 2009 6:16:14 AM(UTC)
Albertvdmeulen

Rank: Advanced Member

Groups: Member
Joined: 3/18/2009(UTC)
Posts: 46

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

We have a site on which people can upload photos.

Photos larger then 3602 pixels we want to downscale to this size.

If i upload a photo of 3302 pixels it is still resized even when i use

Code:
iu.addParam("UploadThumbnail2CompressOversizedOnly", "true");

If i upload several photos (e.g. 3) only one is resized (random: sometimes the first, sometimes the second and sometimes the third) the others ones are only 2kb.

If i only upload one photo i get a thumbnail of 2kb.

Here is the code we use.

Code:

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

//Configure thumbnail2 settings.
iu.addParam("UploadThumbnail2FitMode", "Fit");
iu.addParam("UploadThumbnail2Width", "3602");
iu.addParam("UploadThumbnail2Height", "3602");
iu.addParam("UploadThumbnail2JpegQuality", "100");
iu.addParam("UploadThumbnail2ResizeQuality", "High");
iu.addParam("UploadThumbnail2CompressOversizedOnly", "true");
iu.addParam("UploadThumbnail2CopyExif", "true");

//iu.addParam("UploadSourceFile", "false");

Edited by user Sunday, March 22, 2009 8:29:20 PM(UTC)  | Reason: Not specified

Dmitry  
#2 Posted : Monday, March 23, 2009 8:11:30 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,

Could you let me know what version of Image Uploader gives the problem (Java or ActiveX) and exact version number?

Sincerely yours,

Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!

Albertvdmeulen  
#3 Posted : Tuesday, March 24, 2009 11:38:16 PM(UTC)
Albertvdmeulen

Rank: Advanced Member

Groups: Member
Joined: 3/18/2009(UTC)
Posts: 46

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

We use Image Uploader 5.7.24.0 Dual and only have been testing with Java.

I will try with ActiveX a.s.a.p. and will let you know if the problem occurs with ActiveX aswell.

With kind regards,

Rob Taal

Edited by user Wednesday, March 25, 2009 5:28:01 PM(UTC)  | Reason: Not specified

Albertvdmeulen  
#4 Posted : Wednesday, March 25, 2009 6:09:44 PM(UTC)
Albertvdmeulen

Rank: Advanced Member

Groups: Member
Joined: 3/18/2009(UTC)
Posts: 46

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Hi Dmitry,

Update:

ActiveX - works fine*

Java - Files below 3602 pixels are uploaded, files above 3602 pixels then a 2kb file is uploaded.

*If i have a folder with 18.4Mb total size and

Code:
//iu.addParam("UploadSourceFile", "false");
have this in the code the total upload filesize is 36.71Mb, in the upload folder the total filesize is 18.2Mb!

So it looks like the imageuploader is uploading both the originals and the resized versions but only keeps the resized versions in the upload folder!

If i do

Code:
iu.addParam("UploadSourceFile", "false");
then no images are uploaded (no thumbs, no images)!

If i use

Code:
iu.addParam("UploadThumbnail2CompressOversizedOnly", "true");
all files below 3602 are still resized.

Hope you can help me, with kind regards,

Rob Taal

Edited by user Wednesday, March 25, 2009 7:35:54 PM(UTC)  | Reason: Not specified

Dmitry  
#5 Posted : Sunday, March 29, 2009 2:56:17 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 Rob,

Java has a problem with handling images of large size. The matter of the problem is that Java has limit of memory set to 64mb and sometimes applet has no enough memory to complete the operation. Creating thumbnails means that you need to load image into the memory, resize it, then compress back to Jpeg, ans send to the server. So to successfully complete this operation we have the limit on image size about 50-55mb.

In your script you try to create thumbnail of 40mb = 3602(width) x 3602(height) x 3(bytes per one pixel). Unfortunately it is more than a half of memory available for applet and it cannot be guaranteed that thumbnail is created sucessfully. The only way to solve the problem is to send original image when thumbnail creating is failed. You need to add this string in your script:

Code:

iu.addParam("UploadThumbnail1CompressionMode", "*.* = Jpeg, SourceFile");

We are working on solution for this memory problem. Image Uploader 6 will handle images by chunks and get rid of this issue.

The UploadThumbnailXCompressOversizedOnly property means the following. If this property is true and

  • The original file is JPEG;

  • No watermark is applied;

  • The dimensions of the original file are not greater than the dimensions of thumbnail;

  • The size in bytes of the original file is not greater than the size of the first thumbnail.

Then the original file will be sent instead of the thumbnail. In all other cases the thumbnail is created. Seems, one of these conditions fails in your case.

Sincerely yours,

Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!

Users browsing this topic
Guest
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.