4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: conflagration on October 13, 2009, 01:38:35 PM

Title: Resize images on details page
Post by: conflagration on October 13, 2009, 01:38:35 PM
Hi community,

I just installed 4images and I really like the simplicity of the installation and configuration, but there's still one problem left: I want to use 4images to upload high quality photos, so I allow picture sizes up 10k x 10k pixels. Although I want people to be able to download the pictures in this high resolution, I want the pictures to be shown on the details page resized to a maximum with of 1000px. Is there a way to do this?

Thanks in advance,
Thomas
Title: Re: Resize images on details page
Post by: bergblume on October 13, 2009, 01:56:50 PM
hi thomas...

yes - of course --- just use this small modifcation and you will be happy: http://www.4homepages.de/forum/index.php?topic=15680.0

greetz,
bergblume
Title: Re: Resize images on details page
Post by: conflagration on October 13, 2009, 02:28:44 PM
Hi bergblume,

thank you for your help. I took a look at the threat, and the solution there could be a compromise. But i would prefer something, that would do a server side resizing to avoid unnessecary traffic. I just want the "download" button to return the full size image.

Best regards,
Thomas
Title: Re: Resize images on details page
Post by: mawenzi on October 13, 2009, 03:04:38 PM
hi Thomas and welcome to 4images forum ...

... for this you need some modifications, as described in the following tutorial ...
... [TUT] One Image - Three Sizes : http://www.4homepages.de/forum/index.php?topic=20496.0 ...
Title: Re: Resize images on details page
Post by: apaunganhote on October 14, 2009, 03:22:28 PM
hi Thomas and welcome to 4images forum ...

... for this you need some modifications, as described in the following tutorial ...
... [TUT] One Image - Three Sizes : http://www.4homepages.de/forum/index.php?topic=22030.0 ...

Hi mawenzi,

You pointed out the wrong url, I searched it and here is the correct url

http://www.4homepages.de/forum/index.php?topic=20496.0

Thank you so much for your post. It helped me out. Thanks :)
Title: Re: Resize images on details page
Post by: mawenzi on October 14, 2009, 03:58:05 PM
... you are right ... sorry ... I've corrected the link ...
... but remember ... with the resizing MOD you are loosing the exif-infos from your images ...
... but there are still other ways to show the exif-infos on the detail-page ...
Title: Re: Resize images on details page
Post by: apaunganhote on October 15, 2009, 01:11:36 AM
... you are right ... sorry ... I've corrected the link ...
... but remember ... with the resizing MOD you are loosing the exif-infos from your images ...
... but there are still other ways to show the exif-infos on the detail-page ...

Oops, is it ? Can you please kindly point me out, how to show exif-infos into the page for those resize images ? Because I really need exif-info and resize mods that's why. Thanks mawenzi.

With Regards,
Title: Re: Resize images on details page
Post by: mawenzi on October 15, 2009, 01:43:14 AM
... the loosing of the exif-infos is not a 4images problem ... it's caused by using of the modul "GB Bibliothek" for resizing ...
... here some solutions to show exif-infos on detail-page by using resizing MOD during the image upload via browser / website-uploadform ...

1. by storing of the exif-infos during the upload process ...
    [MOD] EXIF V.1.7.6 Suchfelder Erweiterung : http://www.4homepages.de/forum/index.php?topic=21053.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" in includes/functions.php ...

PS. I use solution No. 2 ... ;)
    
Title: Re: Resize images on details page
Post by: V@no on October 15, 2009, 02:47:50 AM
3. use ImageMagick instead of GD
Title: Re: Resize images on details page
Post by: apaunganhote on October 15, 2009, 03:48:21 AM
Thanks for your quick responses. I gotta try and get back to you  :D . Thanks.

With Regards

=====================================================
Just Tested, everything works fine. Only just one thing, mawenzi , can you please kindly tell me which code do i have to change from the includes/functions.php to get exif info from big image ?

Thanks much.

With Regards
Title: Re: Resize images on details page
Post by: mawenzi on October 15, 2009, 11:42:58 AM
... in includes/functions.php ( e.g. vers. 1.7.7 ) find in section "function get_media_code" ...

if ($detailed_view && $image_info[2] == 2 && function_exists('exif_read_data') && $exif_data = @exif_read_data($src, 'EXIF')) {


... and replace it for your new big-image path with the following ...

$src_big = $site_sess->url(ROOT_PATH."data/media/".$cat_id."/big/".$media_file_name);
$src_exif = (!file_exists($src_big)) ? $src : $src_big;
if ($detailed_view && $image_info[2] == 2 && function_exists('exif_read_data') && $exif_data = @exif_read_data($src_exif , 'EXIF')) {


PS. : or use it similar, the part "EXIF" varies in the different 4images versions ... !
Title: Re: Resize images on details page
Post by: blastarhymes on October 22, 2009, 01:53:29 PM
was gonna say i had this problem but its fixed now :)