Admiror Joomla! Community
http://www.vasiljevski.com/forum/

Custom Thumbnails?
http://www.vasiljevski.com/forum/viewtopic.php?f=9&t=440
Page 1 of 1

Author:  Cadc [ Sun Oct 09, 2011 4:56 am ]
Post subject:  Custom Thumbnails?

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

Author:  Vasiljevski [ Sun Oct 09, 2011 10:44 pm ]
Post subject:  Re: Custom Thumbnails?

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.

Author:  Cadc [ Mon Oct 10, 2011 1:23 am ]
Post subject:  Re: Custom Thumbnails?

Quote:
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 ;)

Author:  Vasiljevski [ Tue Oct 11, 2011 8:05 am ]
Post subject:  Re: Custom Thumbnails?

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

open:
Code:
[root]/plugins/content/admirorgallery/classes/agHelper.php


Edit line 390:
Code:
@imagecopyresampled($dst_img, $src_img, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);

and change it to:
Code:
@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 :)

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/