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

Notification

Icon
Error

Options
Go to last post Go to first unread
flexus  
#1 Posted : Tuesday, November 1, 2005 6:32:13 AM(UTC)
flexus

Rank: Member

Groups: Member
Joined: 11/1/2005(UTC)
Posts: 1

Hi
I am thinking about incorporating Image Uploader into one of my sites but would like a little help first:
I am currently using php to upload images to a MySQL database via an HTML form but want to limit the amount of data uploaded to the server without rejecting user's images.
I would like to be able to preserve as much detail as possible in the uploaded images but also need to be able to specify a maximum height, width and size (bytes). So if the original image falls within these limits it is uploaded without manipulation, but if any are exceeded the image is resized within the set parameters with the aspect ratio maintained. e.g.
Maximum width = 400 pixels
Maximum height = 300 pixels
Maximum file size = 10240 b
>
Image 1 is 400(h) x 400(w) and 20480b this should be resized to 300 x 300 and 10240b
Image 2 is 300 x 300 and 20480 this should not be resized but would need to be compressed to 10240b
>
I can see from other posts that Image Uploader can do the resizing and that I could just upload a single thumbnail without the original image (I think) but can it perform image compression without necessarily resizing?
What about uploading to a database?
Thanks
Alex Makhov  
#2 Posted : Tuesday, November 1, 2005 1:50:33 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Quote:
I am currently using php to upload images to a MySQL database via an HTML form but want to limit the amount of data uploaded to the server without rejecting user's images.
I would like to be able to preserve as much detail as possible in the uploaded images but also need to be able to specify a maximum height, width and size (bytes). So if the original image falls within these limits it is uploaded without manipulation, but if any are exceeded the image is resized within the set parameters with the aspect ratio maintained.


Currently Image Uploader only rejects the uploading of too big files and it resizes all the images (if fit mode is not set to "ActualSize").

If you want your features to be implemented feel free to write us to sales@aurigma.com.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
WiredEyes  
#3 Posted : Wednesday, July 26, 2006 8:54:38 PM(UTC)
WiredEyes

Rank: Member

Groups: Member
Joined: 7/26/2006(UTC)
Posts: 6

Is this still the case, my client has asked to be able to resize images to below a maximum if they are above it.
Fedor  
#4 Posted : Thursday, July 27, 2006 9:14:53 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Quote:
Is this still the case, my client has asked to be able to resize images to below a maximum if they are above it.


If you need to resize image below maximum file size (not image dimensions) then it is your case.

In case of resize image below dimensions UploadThumbnail1FitMode property with Fit value will do it out of the box.

Code:
<script type="text/javascript" src="iuembed.js"></script>
<script type="text/javascript">
var iu = new ImageUploaderWriter("ImageUploader", 710, 500);

//...Any other params...

iu.addParam("UploadSourceFile", "true");
iu.addParam("AllowRotate", "true");

iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "100");
iu.addParam("UploadThumbnail1Height", "100");
iu.addParam("UploadThumbnail1JpegQuality", "70");

//...

iu.writeHtml();
</script>


Please read Rotating, Resizing, and Optimizing Images topic for more info.

Edited by user Wednesday, October 29, 2008 12:44:55 PM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
WiredEyes  
#5 Posted : Friday, July 28, 2006 7:37:23 PM(UTC)
WiredEyes

Rank: Member

Groups: Member
Joined: 7/26/2006(UTC)
Posts: 6

Okay thats great however I tested it and what I find is that even though the image is not resized if below the thumbnail width and height it is still processed and the Jpeg compression is changed.

What this means if say a user uploads a photo at 70% jpeg quality but below the max thumbnail sizes and you have set the jpeg quality to 95% as this is the quality you would like images over the threshold to be resized too so as not to loose quality. Instead it will also change all the smaller images meaning that the file size of those files actually increases (Even though there is no actual change is dimentions or need to change the jpeg quality)
Alex Makhov  
#6 Posted : Sunday, July 30, 2006 8:30:13 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

If fit mode is set to Fit, Width or Height the thumbnail is always recompressed even if the original image is not resized. If fit mode is set to ActualSize it is not recompressed only by Image Uploader for ActiveX if the original file is JPEG-file.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
WiredEyes  
#7 Posted : Sunday, July 30, 2006 9:38:04 PM(UTC)
WiredEyes

Rank: Member

Groups: Member
Joined: 7/26/2006(UTC)
Posts: 6

Quote:
Alex (7/31/2006)
Hello,

If fit mode is set to Fit, Width or Height the thumbnail is always recompressed even if the original image is not resized. If fit mode is set to ActualSize it is not recompressed only by Image Uploader for ActiveX if the original file is JPEG-file.


But wont that make the point of using the thumbnail type a little pointless?

Any chance this type of functions being added to an update? I think it is a really important feature for many people who want to reduce bandwidth and upload time for images over a specified size but don't want to touch images below that size.

I'm sure it would be an easy function to add since you have all the different component parts, it just needs a little more logic.

One thing that is happening now is there are some very high resolution digital camera's out there but for many print sizes there is absolutely no need for such high res images and having and automatic option to resize over sized image would be a much better option for the consumer and the client in terms of bandwidth and storage costs.

Also if possible to keep the original compression ratio with the resize, so if the original was 80% the resized image will also be at 80%.
Alex Makhov  
#8 Posted : Wednesday, August 2, 2006 12:35:15 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Sorry for the long delay.
There is a property named UploadThumbnailNNJpegQuality which is used to specify thumbnail compression quality. If thumbnails of lower size are not recreated but sent as originals this property would not be applicable. Also Image Uploader can send the original image resolutions, IPTC and EXIF data so there is almost no data lost. We have implemented the fit modes which are very simple to understand. If one set fit mode to fit, width or height he knows that the new thumbnails will be created any way. We are not planning to put complex fit modes such as "don’t recreate if lower and recreate if higher". If you want this custom fit mode to be implemented feel free to write to sales@aurigma.com.
Sincerely yours,
Alex Makhov

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.