Is it possible to setup bg in a way, that the automatic generated thumbs are cropped. I want the thumbs to be all equal size weight x height (e.g. all 150 x 150 pixel).

Regards
vistree

Comments

jan.n’s picture

Hi vistree,

BG resizes the iamges to generrate the thumbs, IMHO there's no cropping available.

vistree’s picture

Thank you for answering. It is a mess: BG is such great, but I need cropped (equal in width and height) thumbs.
Is it possible to tell BG to use already generated thumbs??? E.g. if I use a image-upload-modul that creates thumbs during upload, does BG recognize this thumbs?

Regards
vistree

jan.n’s picture

If you want square thumbnails you have to modify the code. You can specify a width and BG automatically adjusts the height maintaining the aspect ratio.

vistree’s picture

Hi jan.n,
thanx again for reply.
I tried to figure out, where to change the setting, so I get cropped, equal sized, squared thumbs.
But I can't ;-( I don't know where to start. Is it in the .module or in one of the php-files?
Is it easy to do or do I have to include total new functions ....

I am no programmer but I would like trying to modify it in the way I need. Can you help?

Best regards

vistree

jan.n’s picture

I'm no professional programmer either, but I think the lines 308, 311, 319 and 322 calculate the size of the images.
If you adjust these lines you'll probably get square images, but they'll be distorted, not cropped.

I don't know how to crop images with drupal/php/gd|imagemagick, perhaps someone else does?
jan

jan.n’s picture

Status: Active » Closed (duplicate)
vacilando’s picture

Version: 6.x-1.2 » 6.x-3.x-dev

Implemented in the latest dev; follow #271583: Cropping Thumbnails, square thumbs.