Custom Thumbnails?

Join us in effort to make Admiror Gallery better. Submit your feature proposals and reviews, we are interested to hear your opinion.
Post Reply
Message
Author
Cadc
Posts: 2
Joined: Sun Oct 09, 2011 4:51 am

Custom Thumbnails?

#1 Post by Cadc »

I'm not sure if its just me, but the autothumbnail feature for the gallery only seems to capture the dead center of an image, chopping off the top and the bottom.. this does not look very good for a gallery preview image..

Have a look at the images (especially Miscellaneous): http://kingstonwildlife.com/gallery/layout

This is a New Website I created for a client, and I'd like to be able to fix this issue if I'm able..

If anyone knows of a way I can create my own image thumbnails for an image, or tell it where specifically on the image I want the auto thumbnail to be, that would be great!

Thanks in advance

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Custom Thumbnails?

#2 Post by Vasiljevski »

Well you could set that thumbs have the same ratio as original, by setting width or height as a reference value. But this will produce different thumbs depending on a image ratio.

Other way is to manually add thumb files into /plugins/content/admirorgallery/thumbs/[galeryname]/ folder :)

As an option for selecting the thumb for every image, this is something that is not easy to do considering the current solution.
General idea was for the thumbs to be auto-generated, and yes it can be set to, for example instead of the center to create thumb from top left corner of the image, that is mutch more realistic to add that custom thumb for every image.
Help Admiror Gallery become even better,
give us a review on JED

Cadc
Posts: 2
Joined: Sun Oct 09, 2011 4:51 am

Re: Custom Thumbnails?

#3 Post by Cadc »

General idea was for the thumbs to be auto-generated, and yes it can be set to, for example instead of the center to create thumb from top left corner of the image, that is mutch more realistic to add that custom thumb for every image.
How would you go about this? cus if I can do that, I think that will be precisely what I need ;)

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Custom Thumbnails?

#4 Post by Vasiljevski »

OK just to be clear that this is a hack and not a solution :)

open:

Code: Select all

[root]/plugins/content/admirorgallery/classes/agHelper.php
Edit line 390:

Code: Select all

@imagecopyresampled($dst_img, $src_img, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
and change it to:

Code: Select all

@imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dst_w, $dst_h, $src_w, $src_h);
This will always take top left as a starting point when creating a thumbnails.

Try it and let me know if this helped :)
Help Admiror Gallery become even better,
give us a review on JED

Post Reply