Paldru Posted April 9, 2013 Share Posted April 9, 2013 (edited) Some of my images have not a 1:1 aspect ratio and a white bar is generated to fill up the space. In some cases I would need the alignment to be top, not center. The code that has to be changed is most likely in the file classes/ImageManager.php, but I am not skilled enough to make the adjustment myself. If anyone could help me with the modification, it would be much appreciated. Edited April 9, 2013 by JanaNovakova (see edit history) Link to comment Share on other sites More sharing options...
vilkas Posted November 2, 2013 Share Posted November 2, 2013 I don't know if you still need an answer but here it is: Yes, you have to edit class/ImageManager. Find the function public static function resize, and replace the line imagecopyresampled($dest_image, $src_image, (int)(($dst_width - $next_width) / 2), (int)(($dst_height - $next_height) / 2), 0, 0, $next_wid th, $next_height, $src_width, $src_height); with imagecopyresampled($dest_image, $src_image, (int)(($dst_width - $next_width) / 2), 0, 0, 0, $next_width, $next_height, $src_width, $src_hei ght); (Instead of "(int)(($dst_height - $next_height) / 2)" a 0.) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now