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

Notification

Icon
Error

Options
Go to last post Go to first unread
mreick  
#1 Posted : Friday, April 29, 2011 9:51:00 PM(UTC)
mreick

Rank: Newbie

Groups: Member
Joined: 8/31/2009(UTC)
Posts: 3

I need to upload an original image, a thumbnail at 1024x768 or 640x480 (whichever one the original image can be re-sized down to) and a second thumbnail 200 pixels wide.

I've got version 6 currently, and I really don't want to have to upgrade. How can I do this easily?

I know to upload the original image, I can use
Code:
iu.addParam("UploadSourceFile", "true");

And for the second thumbnail:
Code:
iu.addParam("UploadThumbnail2Width", "200");
iu.addParam("UploadThumbnail2FitMode", "Width");


But how can I get the first thumbnail that it either exactly 1024x768 or 640x480?

Or at least those would be the minimum dimensions. I'm uploading these images for a flash application, so they have to be exactly the right dimensions, not 640x400 or 1000x768.

If I have to do all the resizing on the server rather than with the uploader, it's kinda defeating the purpose of this software.

Thanks!

Michael

Edited by moderator Saturday, April 30, 2011 2:28:56 AM(UTC)  | Reason: Not specified

Dmitry  
#2 Posted : Monday, May 2, 2011 11:34:40 AM(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)
You need to write client-side script which initializes thumbnail setting depending on image size. Say, you need 640x480 thumbnail, in terms of your task this means that you should get thumbnail of 640x480 size or larger (this means that horizontal dimension is equal or larger than 640 pixels, vertical – is equal or larger than 480). Here are the steps:
  1. You need to calculate resize ratio if you resize original image to 640 by width. If applying this ratio to vertical dimension, height becomes equal or bigger than 480, then your thumbnail settings: ThumbnailXFitMode: Width, ThumbnailXWidth: 640
  2. Otherwise, your thumbnail settings: ThumbnailXFitMode: Height, ThumbnailXHeight: 480
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Dmitry.Obukhov  
#3 Posted : Monday, May 2, 2011 11:08:16 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Michael,

I prepared the sample application, which illustrates Dmitry’s description of the implementation. I attached it for your reference. Please download, and try it out. If you have any additional questions or problems please let me know.
File Attachment(s):
iu6_resizesample.zip (2,124kb) downloaded 4 time(s).
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
mreick  
#4 Posted : Friday, July 8, 2011 11:48:26 AM(UTC)
mreick

Rank: Newbie

Groups: Member
Joined: 8/31/2009(UTC)
Posts: 3

This code worked great for everything up until now. I'm uploading two different images, one larger than 1024x768 and one less than 1024x768. The code you provided resized the smaller one UP to 1024x768, instead of uploading it at 640x480.

I made sure the FilesPerOnePackageCount was set to 1 as well.

Any ideas?

Thanks!

Michael
Dmitry  
#5 Posted : Sunday, July 10, 2011 9:12:15 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 Michael,

Sorry, it is hard to say something not seeing your code and image caused the problem. Moreover Image Uploader cannot resize images up (if you have an image less than 1024x768, you cannot get 1024x768 thumbnail on server side).

Could you provide me with these both images and with access to a page where you tested this feature?
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
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.