4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Tutorials => Topic started by: mawenzi on February 12, 2008, 10:36:05 AM

Title: [TUT] One Image - Three Sizes
Post by: mawenzi on February 12, 2008, 10:36:05 AM
 :flag-en: - first only a englisch version ...
 :flag-de: - eine deutsche Version kommt bald ... oder später ... ;) ... zwischenzeitlich nutze diese Deutsche-Google-Übersetzung (http://translate.google.com/translate?u=http%3A%2F%2Fwww.4homepages.de%2Fforum%2Findex.php%3Ftopic%3D20496.0&langpair=en%7Cde&hl=de&ie=UTF-8) ...


... A answer of your "Three Images Request" ...
... it is not a MOD ... it is only a tutorial ... the MODs are already there ...
... three image sizes by uploading of one image via website / browser ...


... if you want to show these three image sizes on your 4images website, you can modify your website as following ...

1. [Mod] Auto image resize on upload
http://www.4homepages.de/forum/index.php?topic=7700.0

2. [MOD] Auto copy original file to /big/ folder by resize on upload
http://www.4homepages.de/forum/index.php?topic=7700.msg22313#msg22313

3. [MOD] Alternate directory for download files
http://www.4homepages.de/forum/index.php?topic=7499.msg33712#msg33712

4. [Mod] Show original image in new window by clicking on image
http://www.4homepages.de/forum/index.php?topic=3236.0

... this will show you one solution of your "three images request" ...
... you can also find some other ways and solutions of a "three images request" here in the 4images forum ...
... and if you would like to test all these MODs together as "One Image - Three sizes" ...
... then feel free to upload a big nice image on my website ...
... as reg. user without image activation ... as unreg. user with image activation by admin ...



... But remember ... with the resizing MOD you are loosing the exif-infos and the iptc-infos from your images ...
... but there are still other ways to show the exif-infos / iptc-infos on the detail-page ...
... the loosing of the exif-infos / iptc-infos is not a 4images problem ... it's caused by using of the modul "GD Bibliothek" for resizing (look in your APC-settings) ...
... here some solutions to show exif-infos / iptc-infos on detail-page by using resizing MOD during the image upload via browser / website-uploadform ...

1. by storing of the exif-infos / exif-infos during the upload process ...
    [MOD] EXIF V.1.7.6 Suchfelder Erweiterung : http://www.4homepages.de/forum/index.php?topic=21053.0 ...
    [MOD] IPTC V.1.7.6 Suchfelder Erweiterung : http://www.4homepages.de/forum/index.php?topic=21141.0

2. by using of the big-folder solution ( storing of the original image in the big-folder ) and reading of the exif-datas from the "big"-image ...
    [TUT] One Image - Three Sizes : http://www.4homepages.de/forum/index.php?topic=20496.0 ...
    and then is to change the path to the big-images in the "exif function" and "iptc function" in includes/functions.php ...
    [Snippet] Exif-Info from big images : http://www.4homepages.de/forum/index.php?topic=26066.msg142093#msg142093

3. by using of "ImageMagick" instead of "GD Bibliothek" for image resizing ( via your APC-General Settings, if it is possible by your Host ) ...



Other solutions of a "Three Images Request" ...

- [Addon] Highslide from Thumbnail Image : http://www.4homepages.de/forum/index.php?topic=20461.0
- [TUT] 3 Bildgrößen mit phpthumb : http://www.4homepages.de/forum/index.php?topic=7131.0
- [MOD] Details Ansicht / Größe des Bildes begrenzen : http://www.4homepages.de/forum/index.php?topic=9885.0
- [Addon] Huddletogether-Lightbox : http://www.4homepages.de/forum/index.php?topic=11115.0
- [Snippet] Unterschiedliche Bildgrößen in details und postcard : http://www.4homepages.de/forum/index.php?topic=21980.0
- [MOD] Scale Images to fit in browser/ Bilder dem Browser anpassen : http://www.4homepages.de/forum/index.php?topic=15680.0
- [MOD] PHPThumb for Smaller detail image preview (to save traffic) :  http://www.4homepages.de/forum/index.php?topic=25061.0
- [Snippet] Integrar script timthumb.php a 4images : http://www.4homepages.de/forum/index.php?topic=26070.0



... and if you want a solution of your "three images request" by uploading via FTP ...
... then you need a new /admin/checkimages.php ...
... but this should be a new tutorial / mod ...
Title: Re: [TUTORIAL] One Image - Three sizes
Post by: Nicky on February 12, 2008, 10:41:18 AM
thx detlef  :!:
Title: Re: [TUT] One Image - Three sizes
Post by: _AsX_ on February 29, 2008, 09:08:10 AM
Thank you :)

Merci ...
Title: Re: [TUT] One Image - Three sizes
Post by: lona_jasty on July 03, 2008, 12:00:28 PM
I have installed all these mods, & happy with them. But I have a little problem, I hope mawenzi will help me

As image resize by this mod (for better view of gallery)
http://www.4homepages.de/forum/index.php?topic=7700.0

the problem is when user download image by download button, resized image download instead of full size image. I mean, I have uploaded 1600x1200 images, which I resize to 600x480 for better view, 1600x1200 has been copied in big folder, but when user download image by download button, it download 600x480 resolution image instead of downloading 1600x1200. But user can download full size image of 1600x1200, by click 600x480 images, by using this image.
Quote
[Mod] Show original image in new window by clicking on image
http://www.4homepages.de/forum/index.php?topic=3236.0

This problem has been fixed by this Mod
Quote
[MOD] Alternate directory for download files
http://www.4homepages.de/forum/index.php?topic=7499.msg33712#msg33712

So, my problem is only this, I have to upload the same image for 3 times, First in category, then in big folder & in download folder, The image in category got resized, but the image in image in big & download folder are same, same size & same resolution, So, can I use only one directory instead of these two, this will save my disk space.

Any Suggestion ?

Waiting for response!
Title: Re: [TUT] One Image - Three sizes
Post by: mawenzi on July 03, 2008, 09:07:01 PM
... mmm ...
... after you install all the modifications from this tutorial the download must work from the big-folder ...
... sometimes you must change the folder name fom "download" to "big" in the MOD from Chris (Alternnate ... ) ...
... the right way is ... you must only upload one image ... not the same image 3times ...
Title: Re: [TUT] One Image - Three sizes
Post by: lona_jasty on July 04, 2008, 09:21:48 AM
Quote
... mmm ...
... after you install all the modifications from this tutorial the download must work from the big-folder ...
... sometimes you must change the folder name fom "download" to "big" in the MOD from Chris (Alternnate ... ) ...
... the right way is ... you must only upload one image ... not the same image 3times ...


Thanks mawenzi for your Support, I have do this, Happy now  :D
Title: Re: [TUT] One Image - Three sizes
Post by: ckmuc on July 31, 2008, 03:48:52 PM
I am Lost ... This is exactly the function we need (3 images sizes), but I cannot get it to work (right now, uploading does not work at all  8O).

You refer to several Mods here:
Some of them seem to be outdated and there are a lot of "corrections" posted to these Mods...

I tried to get them all organized, but now Uploads do not work at all. We have the most current Version 1.7.6 installed and are registerd licensee.

Is there a "all in one Post" solution or can someone PLEASE supply the adapted files
Esp. these files:


As our System is "totally new" the "file option" would really do the trick ... THANK YOU

Christian
Title: Re: [TUT] One Image - Three sizes
Post by: mawenzi on September 12, 2008, 11:45:57 AM
I tried this mod in combination with
http://www.4homepages.de/forum/index.php?topic=20496.0 (http://www.4homepages.de/forum/index.php?topic=20496.0)
and it works just great on version 1.7.6

... thanks for your statement ... ;)
Title: Re: [TUT] One Image - Three sizes
Post by: 5degrees on November 19, 2008, 04:18:38 PM
Is it necessary to complete all 4 MODs to complete this desired effect or is each MOD a separate solution in its own right?
Title: Re: [TUT] One Image - Three sizes
Post by: mawenzi on November 19, 2008, 05:44:11 PM
@5degrees

... each MOD is a separate solution and works in its own ...
... right ... !
Title: Frage zu nem TUT
Post by: Blesi on December 02, 2008, 10:45:38 AM
Hallo, bei den Tuts gibts das "[TUT] One Image - Three sizes". Gan z unten steht, bei nem upload per FTP gibts n neues Tut. Gibts da schon was? Ich hätte gerne diese funktion, habe aber nur vor der FTP upzuloaden.

Danke Gruß Christian
Title: Re: [TUT] One Image - Three sizes
Post by: ripejuice on December 08, 2008, 10:21:26 PM
thank you mavensi....will this affect google images ranking due to duplicate same images
Title: Re: [TUT] One Image - Three Sizes
Post by: flyfreak on February 28, 2009, 12:00:06 AM
Hello!

After i install "Auto image resize on upload" are there an error telling that the system havent´ the memory for working whit sutch as large files when i upload large pictures. How can i fix that (it is ok for me if i could make an max. file size before uploading like before, where it sayed that the file must be max 1024 px. and you had an opportunity to re-upload)

Do i need to install the "Alternate directory for download files mod" before it will work? (download is set to no, so noone can download)

And witch file do i need to edit in  "Auto copy original file to /big/ folder by resize on upload"

Thank you VERRY mutch!
Title: Re: [TUT] One Image - Three Sizes
Post by: V@no on March 02, 2009, 03:43:20 PM
Quote exact error message please.
Title: Re: [TUT] One Image - Three Sizes
Post by: flyfreak on March 02, 2009, 04:05:10 PM
Quote exact error message please.

Thanks for the answer!

It is the "normal" Fatal error: Allowed memory size of ...
But is it possible to make 3 sizes whitout the resize mod, or is it possible to inset some code, so the mod starts to chek how large the file is, and then cancel the uploading if the picture is too big (like before were it said "unkonown filesize"
Title: Re: [TUT] One Image - Three Sizes
Post by: mawenzi on March 02, 2009, 04:14:04 PM
hi flyfreak,

But is it possible to make 3 sizes whitout the resize mod, ...

... try my hints and links in Other solutions of a "Three Images Request" ...
... I prefer the following solutions ...
- [Snippet] Unterschiedliche Bildgrößen in details und postcard : http://www.4homepages.de/forum/index.php?topic=21980.0
- [MOD] Scale Images to fit in browser/ Bilder dem Browser anpassen : http://www.4homepages.de/forum/index.php?topic=15680.0
Title: Re: [TUT] One Image - Three Sizes
Post by: flyfreak on March 03, 2009, 04:32:43 PM
hi flyfreak,

But is it possible to make 3 sizes whitout the resize mod, ...

... try my hints and links in Other solutions of a "Three Images Request" ...
... I prefer the following solutions ...
- [Snippet] Unterschiedliche Bildgrößen in details und postcard : http://www.4homepages.de/forum/index.php?topic=21980.0
- [MOD] Scale Images to fit in browser/ Bilder dem Browser anpassen : http://www.4homepages.de/forum/index.php?topic=15680.0

Thanks a lot!. now is the pictrure on the detailsite the size that i want. But how can i make a link, were the picture will be in a full size-version?
Title: Re: [TUT] One Image - Three Sizes
Post by: mawenzi on March 03, 2009, 05:02:45 PM
@flyfreak

... you can try this "Bild in Fenster 1.7.4" ... here (http://klick.kl.funpic.de/files.php) ...
Title: [TUT] One Image - Three Sizes Problem
Post by: CarstenM on April 08, 2009, 09:53:54 PM
Hallo, hab mal die Mods von     
[TUT] One Image - Three Sizes

1-3 installiert... so erste Frage ist das normal das im ACP Thumbnails und image resize nicht mehr verfügbar sind?? weil wenn ich die anklicke kommt nichts...
dann wenn ich in den Settings.... die image resize ja machen möchte und qualität einstellen möchte und dann speichere übernimmt er sie nicht!!

bitte um Hilfe!!

Danke=) :D
Title: Re: [TUT] One Image - Three Sizes
Post by: edonai on August 20, 2009, 11:01:12 PM
Thank you for this great work !!
The installation works fine with me, but I have a small problem :

In my ACP, in config=>upload this is my settings :

(http://img18.imageshack.us/img18/9283/sanstitre2hhm.th.jpg) (http://img18.imageshack.us/i/sanstitre2hhm.jpg/)

So if the upload is done by the frontend, image thumbnail is 250px and 350px in detail view.
But if i upload image by backend, image thumbnail is good , but in detail view, she's not resizing to 350px. And if i try to resize it in ACP, the original file in the folder "big" is replaced by the new size (350px) so the download is not good.

Sorry for my poor english, can you help me?
Title: Re: [TUT] One Image - Three Sizes
Post by: popac on September 28, 2009, 03:15:55 PM
4.  [Mod] Show original image in new window by clicking on image
xxx: xxx: 4homepages. de/forum/index. php?topic=3236. 0


This mod working with ver.  1. 7. 7.

Thank you !  :P
Title: Re: [TUT] One Image - Three Sizes
Post by: mawenzi on September 28, 2009, 05:20:22 PM
4.  [Mod] Show original image in new window by clicking on image
xxx: xxx: 4homepages. de/forum/index. php?topic=3236. 0


This mod working with ver.  1. 7. 7.

...

Works with all 4images versions

... I think so ... ;)
Title: Re: [TUT] One Image - Three Sizes
Post by: mawenzi on October 15, 2009, 02:06:47 AM
... habe den ersten Post um den Hinweis des Verlustes der EXIF- und IPTC-Infos aus den Bildern bei Verwendung des "Resizing-MOD's" gemacht und gleichzeitig 2 Alternativen aufgezeigt um das Problem zu umgehen bzw. zu beheben ...
Title: Re: [TUT] One Image - Three Sizes
Post by: apaunganhote on October 19, 2009, 09:51:34 AM
I don't know where to ask support question because I don't know where it is came from. I installed all of the 4 mods.

Quote
1. [Mod] Auto image resize on upload
http://www.4homepages.de/forum/index.php?topic=7700.0

2. [MOD] Auto copy original file to /big/ folder by resize on upload
http://www.4homepages.de/forum/index.php?topic=7700.msg22313#msg22313

3. [MOD] Alternate directory for download files
http://www.4homepages.de/forum/index.php?topic=7499.msg33712#msg33712

4. [Mod] Show original image in new window by clicking on image
http://www.4homepages.de/forum/index.php?topic=3236.0

My Problem is that, I set max width 600px for auto resize. If i add pic more than 600 px, it show the pic in details page. But If i upload less than 600px, it doesn't show the image in details page anymore. I checked the image file and it's in data/media/category folder. But yea that image is not in data/media/category/big since it is not needed to resize.

Any idea please ?

===============================
Edit: Sorry I got it working now. It's because of i missed one {if media_src_big}, thanks.

Thanks.
Title: Re: [TUT] One Image - Three Sizes
Post by: Lucifix on August 25, 2010, 10:03:14 AM
I searched forum and I can't find the right solution.

What I am looking is three size images, but like this:
1. thumbnail (longer size 150px) - directory /thumbnail
2. square (100x100) - directory /square - (something like that: http://www.4homepages.de/forum/index.php?topic=20353.0)
3. image (resized to 1100x900px) - directory /media (http://www.4homepages.de/forum/index.php?topic=7700.0)

I have successfully planted image resize on upload, but I don't know how to create second image (square) and upload it to new folder /square.

Can anyone help me?
Title: Re: [TUT] One Image - Three Sizes
Post by: Rembrandt on August 25, 2010, 04:02:04 PM

1. thumbnail (longer size 150px) - directory /thumbnail
2. square (100x100) - directory /square - (something like that: http://www.4homepages.de/forum/index.php?topic=20353.0)
3. image (resized to 1100x900px) - directory /media (http://www.4homepages.de/forum/index.php?topic=7700.0)

I have successfully planted image resize on upload, but I don't know how to create second image (square) and upload it to new folder /square.
perhaps the square create on the fly, and not a new folder?
Title: Re: [TUT] One Image - Three Sizes
Post by: Lucifix on September 10, 2010, 02:06:52 PM

1. thumbnail (longer size 150px) - directory /thumbnail
2. square (100x100) - directory /square - (something like that: http://www.4homepages.de/forum/index.php?topic=20353.0)
3. image (resized to 1100x900px) - directory /media (http://www.4homepages.de/forum/index.php?topic=7700.0)

I have successfully planted image resize on upload, but I don't know how to create second image (square) and upload it to new folder /square.
perhaps the square create on the fly, and not a new folder?

Can you be please more specific how to create image on fly? maybe with phpthumb?
Title: Re: [TUT] One Image - Three Sizes
Post by: Rembrandt on September 10, 2010, 03:51:45 PM
....
Can you be please more specific how to create image on fly? maybe with phpthumb?

look here (the thumbnail above the detail pic) (http://www.demo2.vienna-pictures.com/details.php?image_id=2)
these pictures are not in folders, they are created when calling page.

Title: Re: [TUT] One Image - Three Sizes
Post by: Lucifix on September 10, 2010, 03:54:44 PM
....
Can you be please more specific how to create image on fly? maybe with phpthumb?

look here (the thumbnail above the detail pic) (http://www.demo2.vienna-pictures.com/details.php?image_id=2)
these pictures are not in folders, they are created when calling page.



Even that link on those thumbnails point to thumbnail directory? If the are created when calling page and not stored on server, could you please tell me how did you do that? Thank you!
Title: Re: [TUT] One Image - Three Sizes
Post by: Rembrandt on September 10, 2010, 04:07:22 PM
....
Even that link on those thumbnails point to thumbnail directory?
waht for a thumb directory?
look here this is small thumbnail mod  http://www.4homepages.de/forum/index.php?topic=25017.msg137021#msg137021
Title: Re: [TUT] One Image - Three Sizes
Post by: Artemios on November 24, 2010, 11:55:48 AM
Hallo,
habe die ersten beiden Schritte eingefügt,
1. [Mod] Auto image resize on upload
2. [MOD] Auto copy original file to /big/ folder by resize on upload

Die Bilder werden jetzt automatisch auf die Bildgröße verkleinerT (super- vielen Dank) , die bei maximale Bildgröße im Control Panel eingetragen sind.
Aber die Originalbilder werden nicht gespeichert. Jedenfalls finde ich sie nicht.
Wo müsste denn der "big"-Ordner sein?

Funktioniert das übrigens mit der Version 1.7.9?

Alles zurück, habe den Ordner big gefunden.
Danke fürs TUT

Beste Grüße Artemios
Title: Re: [TUT] One Image - Three Sizes
Post by: mawenzi on November 24, 2010, 05:01:25 PM
@ Artemios ...

... da du offensichtlich den big-Ordner jeweils in den Kategorie-Ordnern (data->media->Cat_Id->big) gefunden hast, kann man wohl davon ausgehen, dass die einzelnen MOD's in "[TUT] One Image - Three Sizes" auch in der Version 1.7.9 funktionieren ... danke für die Info ... ;)
Title: Re: [TUT] One Image - Three Sizes
Post by: Artemios on November 24, 2010, 10:10:25 PM
Hallo Mawenzi,
ich habe von dem TUT nur die zwei ersten Schritte übernommen, damit ich dann die Originalbilder habe.

Aber eigentlich wollte ich diese Modifikation instalieren:
    
[MOD] Highslide ALL IN ONE (Slideshow/heraussliden details und thumbnails)

Leider bin ich da noch nicht weiter gekommen. Highslide hat zwar sofort funktioniert, aber die Bilder haben die gleiche Größe wie in der Detailansicht.

Deshalb habe ich die Frage gestellt, ob ich nicht drei Bildergrößen benötige. Von Dir kam dann der Hinweis auf das TUT [TUT] One Image - Three Sizes.

Für meine eigentliches Problem hat das aber noch nichts gebracht. Vielleicht hast Du ja noch einen Tip, wie ich Highslide zum Laufen bringe.

Nachtrag:
Ich habe diese zwei Zeilen in die jpg.html eingefügt.:

Lösung gefunden:

 <a href="./data/media/{cat_id}/big/{image_file_name}" class="highslide" onclick="return hs.expand(this, {captionId: 'caption1'})">
         <img src="{media_src}" alt="Highslide JS"  ="" /></a>

Bei gleichen Dateinamen funktioniert es einwandfrei.

Aber die Dateien im big-Ordner haben die Dateinamen, wie sie beim Upload angegeben wurden, darunter sind evtl. auch Großbuchstaben .
Die verkleinerten Bilder haben nur Kleinbuchstaben im Dateinamen. Das müsste angeglichen werden, sonst klappt es nicht.

Entweder muss diese Umwandlung in Kleinbuchstaben bei der Verkleinerung herausgenommen werden, oder beim Kopieren der Originalbilder in den Ordner big muss diese Umwandlung auch erfolgen.

Wo finden ich die Zeilen, die diese Umwandlung bewirken?

Nachtrag:

Ich denke, dass ich im 2. Schritt beim Kopieren der Originaldatei in den Ordner big, den Dateinamen auf Kleinbuchstaben umwandeln muss.

Von Rembrandt habe ich den Hinweis bekommen, die Funktion

strtolower($deintext);   zu benutzen.

Ich habe es in member.php versucht mit:

$new_name = $site_upload->upload_file("media_file", "media", $upload_cat);
      $new_name = strtolower($new_name);

aber dann wird die verkleinerte Datei für das Detailbild nicht abgespeichert.

Ich finde den Code ziemlich verwirrend und für mich nicht recht durchschaubar.
Wo sollte ich denn strtolower( ) einfügen?



Grüße
Artemios
Title: Re: [TUT] One Image - Three Sizes
Post by: MrAndrew on August 20, 2012, 02:02:45 PM
I`ve a wrong info in this MODs...

{download_width} and {download_height} - shows me resized image parameters...

Also {download_button} - working the same!

How i can fix this?
Title: Re: [TUT] One Image - Three Sizes
Post by: Baxi on March 12, 2013, 10:34:19 PM
Ich versteh es nicht, was genau ich da machen soll.

In der Kategorieübersicht soll das Thumbnail maximal 150x150 Pixel haben, soweit ja klar. Klickt man auf dieses Vorschaubild, soll Bild erscheinen das 300x300 Pixel groß ist und erst wenn man auf Download klickt, soll die Orginalgröße erscheinen.

Ich will nicht, das irgendwie aus meiner Orginalgröße automatisch ein Thumbnail erzeugt wird. Die beiden Vorschaubilder 150x150 und 300x300 erstelle ich selbst. Die sollten alle beim Bilupload über den Pc hochladbar sein, wie es jetzt auch der Fall ist.

Bei mir kann auch nur ich als Administrator hochladen, es wird auch keine Postkarten geben :-)

Nur weiß ich jetzt, was für mich von all diesen Sachen relevant ist, da sich irgendwie nichts nach dem anhört, was ich wirklich suche.

Wenn es eine einfache Möglichkeit mit 2 Bildern gäbe, nehme ich diese auch. Beispiel das das Thumbnail 300x300 Pixel ist und wenn man auf dieses klickt um zu den Details zu gelangen, es die gleiche Größe hat und auch erst wieder beim Download die Orginalgröße zeigen