• [Mod] Auto image resize on upload v2.0.1 (2010-12-18) 4 0 5 1
Currently:  

Author Topic: [Mod] Auto image resize on upload v2.0.1 (2010-12-18)  (Read 588332 times)

0 Members and 3 Guests are viewing this topic.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #300 on: September 24, 2007, 01:50:55 AM »
45M is high for ressource ... what if 32M ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Kenny1980

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #301 on: September 24, 2007, 12:13:28 PM »
Hi,
at 32M there comes a error.

greets
Kenny

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #302 on: September 24, 2007, 12:46:59 PM »
Wow ... what is server specs exact ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline monkey

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #303 on: September 28, 2007, 05:14:18 AM »
i know this is freaking old post but i cant get this download on page 1 of installation to work for me, the link just times out, I tried saving it too and it was an html file which is not what i need.
Is there somewhere else I can find this install file?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #304 on: September 28, 2007, 09:04:13 AM »
... at the bottom of the first post you can find the link ...
... install_autoimage.zip (1.53 KB - runtergeladen 1078 Mal.) ...
... be No. 1079 ... ;)
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Lory

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #305 on: October 11, 2007, 12:50:29 AM »
Hi guys.
I have one problem, the mod doesn't work.
I have done the step by step exactly and there aren't error in the code,but,
In the admin's panel when i set on "yes" the option Auto-Resize Image, If I save the change(on yes),automatically the admin's panel exchange again the set option on "NO".
i have try to upload a image for testing the resize, but don't work

what is the solution for this problem?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #306 on: October 11, 2007, 01:15:18 AM »
Quote
i have try to upload a image for testing the resize, but don't work

what is the solution for this problem?

To say what is say after upload image. Error message ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Lory

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #307 on: October 11, 2007, 05:29:29 AM »
no, nothing error. the upload is correct but the image non resized.
In the admin's panel when i set on "yes" the option Auto-Resize Image, If I save the change(on yes),automatically the admin's panel exchange again the set option on "NO".

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #308 on: October 11, 2007, 06:34:32 PM »
Ok, so follow step 1, step 2 and step 3 of my signature. Is possible is something of the 3.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Lory

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #309 on: October 11, 2007, 07:43:31 PM »
step 1 ----- add code in member.php
find

Code: [Select]
if (!$uploaderror) {above insert
Code: [Select]
//--------------------------------------------
//---------Start Code Auto Image Resizing --------------
//--------------------------------------------
                  if ($config['auto_image'] && !$uploaderror) {
                     if ($direct_upload) {
                        $src = MEDIA_PATH."/".$cat_id."/".$new_name;
                    }
                    else {
                        $src = MEDIA_TEMP_PATH."/".$new_name;
                    }
                    $do_resize = 0;
               if ($image_info = @getimagesize($src)) {
                       if ($image_info[2] == 1 || $image_info[2] == 2 || $image_info[2] == 3) {
                          $do_resize = 1;
                    }
                  }
                  if ($do_resize) {
                     if (!function_exists(init_convert_options)) {
                           require(ROOT_PATH.'includes/image_utils.php');
                        }
                  if ($image_info[0] > $config['max_image_width'] || $image_info[1] > $config['max_image_height']) {
                       $convert_options = init_convert_options();
                       if (!$convert_options['convert_error']) {
                         $quality = (intval($config['auto_image_quality']) && intval($config['auto_image_quality']) <= 100) ? intval($config['auto_image_quality']) : 100;
                        if (!resize_image($src, $quality, $config['max_image_width'], 1, $config['max_image_height'])) {
                           $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name;
                                 $uploaderror = 1;
                          }
                           }
                        }
                     }
                  }
//---------------End Code auto Image Resizing----------------------------

step 2 ----- add code in /includes/upload.php
find
Code: [Select]
$this->max_height['media'] = $config['max_image_height'];below insert
Code: [Select]
   
 //---------Start Code Auto Image Resizing (part 1)----
 $this->auto_image['media'] = $config['auto_image'];
 //---------End Code Auto Image Resizing (part 1)----

step 2.2 ----- add code in /includes/upload.php
find
Code: [Select]
    if ($this->image_size[1] > $this->max_height[$this->image_type]) {
      $ok = 0;
      $this->set_error($this->lang['invalid_image_height']);
    }
below insert
Code: [Select]
         //---------Start Code Auto Image Resizing (part 2)----
          if ($this->auto_image[$this->image_type]) {
         $ok = 1;
      }
      //---------End Code Auto Image Resizing (part 2)----

step 3 ----- add code in  /admin/settings.php
find
Code: [Select]
show_setting_row("upload_emails");below insert
Code: [Select]
  //---------Start Code Auto Image Resizing ----
  show_setting_row("auto_image", "radio");
  show_setting_row("auto_image_quality");
 //---------Start Code Auto Image Resizing ----

step 4 ----- add code in /lang/italian/admin.php
find
Code: [Select]
$setting['auto_thumbnail_quality'] = "Thumbnail quality<br /><span class=\"smalltext\">0 to 100</span>";below insert
Code: [Select]
/*-- START CODE AUTO RESIZE IMAGE --*/
$setting['auto_image'] = "Auto-resize image";
$setting['auto_image_quality'] = "Auto-resize image quality";
/*-- END CODE AUTO RESIZE IMAGE --*/

this is all my step.
i dont have install another mod.

Version 4images 1.7.4
PHP Version 5.2.0


i wait your help guys.
if all it works I buy 2 license for my sites, but if dont work i cannot use it :(

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #310 on: October 11, 2007, 08:18:02 PM »
Quote
PHP Version 5.2.0

Please read step 7 on my signature for this.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Lory

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #311 on: October 11, 2007, 08:41:42 PM »
i have done step 7 but nothing change.

pls read this..


i try to upload one image with dimension 1550x1000pix. in the admin pannel i have setting max width and heigth on 445pix
when i go to upload the image apper this message:

i post attachment screenshot:

P.S. identical problem with php4.4.6

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #312 on: October 11, 2007, 08:43:19 PM »
Quote
i have done step 7 but nothing change.

Is no for change - is for read  :!:

No answer for this problem with PHP v5.2+.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.421
    • View Profile
    • 4images - Image Gallery Management System
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #313 on: November 27, 2007, 12:12:09 PM »
A video tutorial of this mod can be watched here:

http://www.asian-lady.org/tutors/resize-mod/resize-mod.html
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline kotyara

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #314 on: January 04, 2008, 12:10:45 AM »
install this mod, but have some problem. Size of pic, not auto change and then try to change in acp see this:
Code: [Select]
Конвертировать файл фотографии: PIC_0078_2.jpg (1600x1200) ....  
Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /opt/lampp/htdocs/gallery/includes/image_utils.php on line 74

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /opt/lampp/htdocs/gallery/includes/image_utils.php on line 82

Warning: imagejpeg(): supplied argument is not a valid Image resource in /opt/lampp/htdocs/gallery/includes/image_utils.php on line 93

Warning: imagedestroy(): supplied argument is not a valid Image resource in /opt/lampp/htdocs/gallery/includes/image_utils.php on line 95

   Ошибка при конвертировании файла фотографии!
host: Apache/2.2.4, PHP/4.4.7, MYSQL 5.0.41
gallery: 1.7.4
mod: signature on upload
gd - is ok thum is greats.
sorry for bad english)
freeline.net.ua