Author Topic: Autoresize - size limit  (Read 8687 times)

0 Members and 1 Guest are viewing this topic.

Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Autoresize - size limit
« on: November 05, 2010, 02:10:30 PM »
I know that there is mod that will autoresize image if width or height is too big, but I couldn't find any mod that would lower image quality if image size (KB/MB) is too big?

So if member would like to upload image that is 5MB size, script would change quality to fit max size (etc. 500KB).

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: Autoresize - size limit
« Reply #1 on: November 05, 2010, 06:14:45 PM »
I know that there is mod that will autoresize image if width or height is too big, but I couldn't find any mod that would lower image quality if image size (KB/MB) is too big?

So if member would like to upload image that is 5MB size, script would change quality to fit max size (etc. 500KB).

Hi,

you should set up under ACP > Settings > Upload settings:
Code: [Select]
Max. image size in KB
Max. image width in pixel
Max. image heigth in pixel

If someone uploads up to 5 MB picture you should set 5120kb
and the width / height you prefer.


Greetz X23

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Re: Autoresize - size limit
« Reply #2 on: November 07, 2010, 12:06:09 PM »
thx but this is not what i'm looking for. What I want is if user is trying upload lets say 5MB photo and the limit is 1MB, quality of his photo will be automaticaly change so it will fit the limit (in this case 1MB).

With you suggestion user won't be able to upload photo which is bigger then limit, unless he will resize it.


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Autoresize - size limit
« Reply #4 on: November 07, 2010, 04:04:49 PM »
The problem is, there is no way to predict how big will be the filesize after compression...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Rembrandt

  • Guest
Re: Autoresize - size limit
« Reply #5 on: November 07, 2010, 04:33:49 PM »
The problem is, there is no way to predict how big will be the filesize after compression...
yes,  it is absurd that to limit the megabyte, therefore only the dimensions limit.


Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Re: Autoresize - size limit
« Reply #6 on: November 07, 2010, 06:24:50 PM »
thx for info v@no.

What would you suggest to do, because some of my members complained that they don't have any graphic program to change file size and all of their photos are bigger then 1MB. I suppose if I set size limit to 5MB (with installed mod auto image resize) all uploaded images will be smaller then lets say 1MB?

@Rembrandt: thx for link, but I know that mod pretty well ;)

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: Autoresize - size limit
« Reply #7 on: November 07, 2010, 06:39:49 PM »
thx for info v@no.

What would you suggest to do, because some of my members complained that they don't have any graphic program to change file size and all of their photos are bigger then 1MB. I suppose if I set size limit to 5MB (with installed mod auto image resize) all uploaded images will be smaller then lets say 1MB?

@Rembrandt: thx for link, but I know that mod pretty well ;)

Hi,

they should take some seconds and use for example:
http://www.picresize.com/

There are much more services...

or offer that little tool from... tatatata microsoft  (whis) (never thought about that):
http://download.microsoft.com/download/whistler/Install/2/WXP/EN-US/ImageResizerPowertoySetup.exe


Greetz X23

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Rembrandt

  • Guest
Re: Autoresize - size limit
« Reply #8 on: November 07, 2010, 06:46:05 PM »
...some of my members complained that they don't have any graphic program to change file size...
best way is in ACP general/settings
Max. image width in pixel e.g. 1000px
Max. image heigth in pixel e.g 1000px

your user install this programm, very easy and simple.

mfg Andi

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: Autoresize - size limit
« Reply #9 on: November 07, 2010, 06:55:44 PM »
Hi,

another solution for online resize with a little embedtation on your site:

Code: [Select]
<form encType="multipart/form-data" method="post" action="http://www.shrinkpictures.com/resize.php" target="_blank">
<input value="6000000" type="hidden" name="MAX_FILE_SIZE"><b>1</b> Choose
Picture or Photo to Shrink <input size="30" type="file" name="image"><br>
<br>
<b>2</b> Select New Maximum Image dimension<br>
&nbsp; <input value="a" type="radio" name="size"> 760 Pixels
<input value="b" type="radio" name="size"> 600 Pixels
<input value="c" CHECKED type="radio" name="size"> 350 Pixels
<input value="d" type="radio" name="size"> 100 Pixels<br>
&nbsp; <input value="e" type="radio" name="size"> 75%
<input value="f" type="radio" name="size"> 50%
<input value="g" type="radio" name="size"> 25%<br>
&nbsp; <input value="h" type="radio" name="size"> Custom
<input value="50" size="6" type="text" name="customsize"> <span class="xs">
maximum 1000px</span><br>
<br>
<b>3</b> <input value="opt" type="checkbox" name="optional"> Apply an image
Special effect <em>(Optional)</em> <br>
&nbsp; <input value="grey" CHECKED type="radio" name="xtra"> Greyscale
<input value="sepia" type="radio" name="xtra"> Sepia<br>
<br>
<b>4</b> Set resized image quality <em>(jpg compression)</em><br>
&nbsp; <input value="a" type="radio" name="qual"> Good
<input value="b" CHECKED type="radio" name="qual"> Better
<input value="c" type="radio" name="qual"> Best <br>
<br>
<b>5</b> <input class="SB" value="Resize" type="submit"> <span class="xs">*
be patient if original picture is large</span>
</form>

you can also hardcode the settings:

Code: [Select]
<form encType="multipart/form-data" method="post" action="http://www.shrinkpictures.com/resize.php" target="_blank">
<input value="6000000" type="hidden" name="MAX_FILE_SIZE">
<input value="c" type="hidden" name="qual">
<input value="opt" type="hidden" name="optional">
<input value="1000" size="6" type="hidden" name="customsize">
<input size="20" type="file" name="image">
<br><br>
<input class="SB" value="Resize" type="submit">
</form>


Greetz X23
« Last Edit: November 07, 2010, 07:16:31 PM by x23piracy »

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Rembrandt

  • Guest
Re: Autoresize - size limit
« Reply #10 on: November 07, 2010, 07:14:39 PM »
....another solution for online resize with a little embedtation on your site:....

was macht das für einen sinn erst ein bild mit 5mb hochladen und dann sowieso nur ein bild mit ~500kb anzeigen, ausser endloses traffic..

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: Autoresize - size limit
« Reply #11 on: November 07, 2010, 07:31:45 PM »
Hi,

das ist doch sein Problem die Frage des Sinn und Zweck der Sache entsteht doch erst dann
wenn es richtig arbeit kosten würde.

Es gibt halt die zwei möglichkeiten das on und offline zu tun und wenn richtig Druck auf der
Leitung ist dann interessiert es doch eh keinen mehr ob man 3MB hochladen muss...
geschweige denn Otto-normal User.


Gruß Jens

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--