It is currently Sat Dec 16, 2017 11:18 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Custom Thumbnails?
PostPosted: Sun Oct 09, 2011 4:56 am 
Offline

Joined: Sun Oct 09, 2011 4:51 am
Posts: 2
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


Top
 Profile  
 
 Post subject: Custom Thumbnails?
PostPosted: Sun Oct 09, 2011 4:56 am 
Top  
 Post subject: Re: Custom Thumbnails?
PostPosted: Sun Oct 09, 2011 10:44 pm 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
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


Top
 Profile  
 
 Post subject: Re: Custom Thumbnails?
PostPosted: Mon Oct 10, 2011 1:23 am 
Offline

Joined: Sun Oct 09, 2011 4:51 am
Posts: 2
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 ;)


Top
 Profile  
 
 Post subject: Re: Custom Thumbnails?
PostPosted: Tue Oct 11, 2011 8:05 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
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 :)

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

 


All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

This is the official Admiror Joomla! Community Forum. You are welcome to join the Admiror Joomla! Community. All Admiror Joomla! Extensions Users, Joomla! Developers, PHP or mySQL Developers are welcome to support & contribute to Admiror Joomla! Projects.

Joomla! is a free and open source content management system (CMS) for publishing content on the World Wide Web and intranets. With a vibrant volunteer community, user-friendly features and plenty of power, Joomla is perfect for your website!

Joomla! is written in PHP, uses object-oriented programming (OOP) techniques and software patterns, stores data in a MySQL database, and includes features such as page caching, RSS feeds, printable versions of pages, news flashes, blogs, polls, search, and support for language internationalization.

Joomla! is the property of Open Source Matters, Inc. All rights reserved. Read more about Joomla! at http://www.joomla.org/.


Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group