• [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 590534 times)

0 Members and 1 Guest are viewing this topic.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #435 on: March 15, 2010, 09:18:03 PM »
Fine Modifikation.
But a Feature ist los. Upload in ACP with resize and Full size saved in big!!

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #436 on: March 15, 2010, 11:02:49 PM »
... auch das Feature ist noch da, nur du hast nicht geschafft bis auf Seite 3 weiterzulesen ... ;)
... hier gibt es das BIG-Feature ... http://www.4homepages.de/forum/index.php?topic=7700.msg22313#msg22313 ...
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 Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #437 on: March 15, 2010, 11:14:39 PM »
Aber das wird ja in der member.php verbaut. Demnach wird doch über das ACP nichts in einem big Ordner gespeichert!

Ich habe sowieso mal ein paar Fragen zu dem "Auto-Image-Resizer"
Beispiel:


Wie man sieht, will ich die Größe: 426x300 vergeben, aber dabei kommt immer was anderes heraus. Habe extra [FIX] Max height has no affect when do image resize installiert, aber trotzdem funktioniert das nicht. Ob ich feste Breite oder Feste Höhe angebe. Es wird trotzdem Proportional verkleinert.

Gibt es keine Möglichkeit eine Feste Breite und Höhe anzugeben? Ich habe die Thumbnails und die Detailsbilder als Hintergrundbild. Da man via CSS die Hintergrundbilder nicht auf einer Größe reduzieren kann bin ich gezwungen, die Bilder halt mit einem Rezizer anzupassen. Ich möchte aber nicht jedes Bild/Thumbnail auf dem Computer die richtige Größe zu verpassen.

Kann man irgendwo die Rezizegröße im Code für die Bilder und den Thumbnails direkt eintragen, so das sich das auch nicht mehr ändert? Auch wenn die Ato Rezize on Upload installiert habe funktioniert das nicht. Es wird bei mir sowieso kein Big Ordner angelegt, davon mal abgesehen.

Über das ACP einen Punkt mit "Rezizer" und die Optionen Thumbnailer und Bilder eine DIREKTE Größe zu verpassen wäre mehr als wünschenswert. Allerdings weis ich nicht wie das funktioniert sonst hätte ich schon was gebastelt. Und am liebsten würde ich das ganze auf Englisch formulieren, weil ich denke das V@no mit Sicherheit dafür eine Idee hätte.

Ich möchte quasi Bilder einer X-Beliebigen Größe via ACP hochladen können, sowohl das Bild als auch das Thumbnail. Durch den Klick auf "Resizer" kann man dann für Thumbnails und den Bilder eine feste Größe angeben und auf "Resize" klicken oderso.

Das wäre sowas von perfekt!!!

LG

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: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #438 on: March 16, 2010, 12:16:29 AM »
There are not many people would actually want distort a picture, that's why 4images resizes images proportionally.
here is example how your screenshot would look like if width is the same as height:


is this what you want?
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)

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #439 on: March 16, 2010, 12:19:23 AM »
Sorry for repeat myself, but so far nobody has reacted to my question:

How to decrease or change the file-size/-resolution of the pictures in the BIG-folder during the upload-process?

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #440 on: March 16, 2010, 10:35:40 AM »
There are not many people would actually want distort a picture, that's why 4images resizes images proportionally.
here is example how your screenshot would look like if width is the same as height:


is this what you want?

Hallo Vano, dass ist ja in den meisten Fällen auch gut so. Ich verwende auf meiner Seite Covers. Die Thumbnails haben dort eine Größe von 115x81 und die Bilder 426x300. Die Bilder und die Thumbnails werden als Hintergrundgrafiken ausgegeben. Über den Grafiken liegt eine andere Grafik. Darum möchte ich die Möglichkeit haben den Bildern eine feste Größe zu verpassen welche nicht Proportional ist.

Ein Plugin würde reichen. Ich werde mich an so einem Plugin selber versuchen. Ein Plugin wäre in diesem Fall am sinnvollsten da nicht jeder solch eine Erweiterung gebrauchen kann.

Google Translate
Hi Vano, that yes, in most cases a good thing. I use covers on my side. The thumbnails are there a size of 115x81 and images 426x300. The images and the thumbnails are displayed as background graphics. About the charts is another graphic. Therefore I would like to have the opportunity to miss the pictures has a fixed size which is not proportional.

A plugin would be enough. I'll try my hand at such a plugin myself. A plugin would in this case could use the most sense because not every such an extension.

Offline jaheba

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #441 on: April 16, 2010, 09:08:46 AM »
Is this mod working in ver 1.7.7 ?

Offline 2snaps

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #442 on: May 01, 2010, 01:39:38 PM »
-> jaheba

Yes It works fine in version 1.7.7  :D

Offline Guldstrand

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: [Mod] Auto image resize on upload.
« Reply #443 on: May 28, 2010, 02:13:49 PM »
Quote from: stb
2) default display resized image, but make smthn. like button "hi res" to view an original

On my site I use [Mod] Show original image in new window by clicking on image.
And this mod automaticaly copy original file to /big/ folder if the image is being resized (/big/ folder also automaticaly created if its not exist).
Just need use in Step 1. this code:
Code: [Select]
//--------------------------------------------
//--------- Auto Image Resizing --------------
//--------------------------------------------
                  if ($config['auto_image'] && !$uploaderror) {
                     $src_copy = MEDIA_PATH."/".$cat_id."/big";
                     if ($direct_upload) {
                        $src = MEDIA_PATH."/".$cat_id."/".$new_name;
                        $src_copy = MEDIA_PATH."/".$cat_id."/big";
                    }
                    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');
                        }
                        $convert_options = init_convert_options();
         if (!$convert_options['convert_error']) {
if ($image_info[0] > $config['max_image_width'] || $image_info[1] > $config['max_image_height']) {
$result = true;
 if (!@is_dir($src_copy)) {
   $oldumask = umask(0);
   $result = mkdir($src_copy);
   umask($oldumask);
   if (!@is_dir($src_copy) || !$result) {
     $result = mkdir($src_copy, 0755);

   }
 }
if ($result == true){
copy($src, $src_copy."/".$new_name);
}
                     $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)) {
                        $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name;
                           $uploaderror = 1;
                        }
                    }
                  }else{
                  $do_resize = 0;
                  }
                       }
                     }
                  }
//-------------------------------------------

P.S. it works on my windows system, dont know about any others :roll:
Maybe a stupid question, but where am i supposed to add this code?
Shall i change the code in member.php (from the first post), to this one?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
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 Guldstrand

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #445 on: June 02, 2010, 02:06:58 AM »
How to use this mod with the Auto-Image-Resizer in admin?
I´ve already over 3000 images in my gallery, and i want to auto create intermediate images for them to.

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
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)

Offline Carpfish

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Carp-Photo-Portal
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #447 on: June 15, 2010, 08:32:08 AM »
Habe auch diesen Mod in verwendung und Funktioniert echt super...Thanks V@no
Zusätzlich habe ich noch den Highslide dazu.

Nur habe ein Problem, ich habe auch den Media Site´s Mode http://www.4homepages.de/forum/index.php?topic=24054.0 von V@no instaliert.
Ich bekomme zwar das Thumb, aber in der Detailseite sehe ich nichts.
Hat dies mit dem Images Resize Mode zu tun?
Vieleich kann mir wer helfen, habe im Moment ein zweites 4images mit Videos auf einer anderen Datenbank laufen, möchte es aber in der Bildergallery verwenden.

Thanks Andy

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [Mod] Auto image resize on upload.
« Reply #448 on: July 02, 2010, 04:14:04 PM »
Quote from: stb
2) default display resized image, but make smthn. like button "hi res" to view an original

On my site I use [Mod] Show original image in new window by clicking on image.
And this mod automaticaly copy original file to /big/ folder if the image is being resized (/big/ folder also automaticaly created if its not exist).
Just need use in Step 1. this code:
Code: [Select]
//--------------------------------------------
//--------- Auto Image Resizing --------------
//--------------------------------------------
                  if ($config['auto_image'] && !$uploaderror) {
                     $src_copy = MEDIA_PATH."/".$cat_id."/big";
                     if ($direct_upload) {
                        $src = MEDIA_PATH."/".$cat_id."/".$new_name;
                        $src_copy = MEDIA_PATH."/".$cat_id."/big";
                    }
                    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');
                        }
                        $convert_options = init_convert_options();
         if (!$convert_options['convert_error']) {
if ($image_info[0] > $config['max_image_width'] || $image_info[1] > $config['max_image_height']) {
$result = true;
 if (!@is_dir($src_copy)) {
   $oldumask = umask(0);
   $result = mkdir($src_copy);
   umask($oldumask);
   if (!@is_dir($src_copy) || !$result) {
     $result = mkdir($src_copy, 0755);

   }
 }
if ($result == true){
copy($src, $src_copy."/".$new_name);
}
                     $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)) {
                        $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name;
                           $uploaderror = 1;
                        }
                    }
                  }else{
                  $do_resize = 0;
                  }
                       }
                     }
                  }
//-------------------------------------------

P.S. it works on my windows system, dont know about any others :roll:

I still do need help to resize also the big/original-file. In my gallery some pictures are 7 Megabyte (!), too much :-) So I've resized all my big-images by an php-image-resizer to a max-height or max-width of 1600px and a jpg-quality of 75. This took many hours!

I'd like to have this function in 4images for the original-image, before it will be copied in to the big-folder.

So please, I do hope, somecone could help me out...

Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Re: [Mod] Auto image resize on upload. (updated 19/09/04)
« Reply #449 on: October 02, 2010, 10:23:54 AM »
Does anyone know if EXIF info will be lost if image will be auto resized? I tested this on my site and EXIF is gone. Anyone know how to fix that?