Define Picture Size Limit Question
ryanh
Joined: 2005-01-27
Posts: 29 |
![]() |
I have a question about the Album Properties, under Define Picture Size Limit. I would like to place a 500kb maximum file size limit on the photos in my albums, mainly because I don't want the storage to get eaten up with large pics directly from +3MP cameras! I've set this option to 500kb, however it is still letting the user upload an image larger than 500kb, and isn't resizing them. The owner of the album is 'family', and the user I'm doing this with is the same. I guess what I'd like to have is something that will take an image that is larger than 500kb, and size it down until it's 500kb or less. Is this possible? Are there any hacks that would allow me to do this? Am I being greedy!? (maybe!) Thanks for your input! |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
The sizelimit module currently does not resize the image dimensions (Edit: when you specify only a max size in kb).. it tries its best to meet the requested limit by lowering jpeg quality or raising png compression level. If it puts jpeg quality all the way down to 5 then it keeps that. Sounds like you'd like a new feature in this module to reduce the dimensions to meet the size limit you want... please file a feature request on sourceforge, thanks! By the way, if you want to get this to work now you should enter values for both max dimensions and max filesize.. if you enter max dimensions of 1024x768 then it is more likely it will be able to achieve the 500k limit by lowering jpeg quality. Push the dimension limit down until it is able to get 500k on most/all images..... |
|
ryanh
Joined: 2005-01-27
Posts: 29 |
![]() |
Sounds good, so from what I understand it'll allow a very large image to be uploaded and resize it itself. This is good, because there will be a lot of people that don't know the first thing about modifying images to be smaller. Thanks for your help! |
|
gillenm
Joined: 2005-04-24
Posts: 4 |
![]() |
Hi, I am having this same problem. I am using the holy hand grenade release at the moment. (http://cgi.sunim.plus.com/gallery2) My album configuration is: Resized Images: [X] 400 x 600 Picture Size Limit: Maximum dimensions of full sized images [ ] No Limits Maximum file size of full sized images in kilobytes [ ] No Limits [ ] Keep original image? I uploaded a picture to this album, the original picture size is: 960 x 1280 pixels. I used the upload applet without checking "resize before upload". When I click on the photo it shows these size options: 400x533 The size of the file on the server is 203k. I'd really like the 960x1280 (original) to be deleted for the sake of server space! I have checked imagemagick and run tests on it, I have checked that the sizelimit Am I using it wrong? Thanks, |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
GR / applet do not currently obey ItemAddOptions like sizelimit. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
mindless, why? I thought sizelimit would listen on entity->save events. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
no, it's an ItemAddOption. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
mindless, why not as entity->save listener? you can move the file on the filesystem around (temp dir) and then create the downsized versions? or would that be after derivates have been created? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
it would certainly work as an event listener, but that's a little bit of code that has to run on every save() operation to determine if it has work to do or not... ItemAddOption is a bit more targetted.. those are only loaded when adding items. but mainly, that's just the way it was written. |
|