I am using brilliant_gallery and lightbox2 with a theme which uses a div for scrolling the main content "inline" if the content is larger than what fits in the main content div.
With this feature lightbox2 has rendering problems (tested with firefox 2.0.0.12) when the height of a photo is bigger than what fits on the page. Therefore I thought, maybe it would be nice not only to be able to have a maximum width of the full image but also a maximum heigth. Whatever size is smaller would be used and the other size calculated.
Of course, a fix of the real problem within lightbox2 would be nice, but is not the subject here.

Thanks,
very nice and comfortable module,
Christian.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

meichr’s picture

Title: Add maximum height of large icture in settings » Add maximum height of large picture in settings
Component: User interface » Code
Status: Active » Needs review
FileSize
5.25 KB

I am using brilliant gallery within a theme which doesn't intend the main window to scroll. Instead the contents are scrolled within a div of the theme. So I wanted the overlay browser to use images which also do not enable scrolling. If you are only given the possibility to manage "Maximum width of full image" in the settings, which is used to limit the longer side of the image (either width or height) you would have to set a very small value at this parameter so that vertical scrolling would be prohibited with big portrait images. Given that the typical browser window is more wide than high you loose valuable image size width landscape images this way.

With the 5.x-3.0 version of brilliant gallery you define the length and height of a SQUARE with "Maximum width of full image". My suggestion is to have two values to define a RECTANGLE, so that the typical browser window can be better used for landscape images and the portrait images are reduced so that the window doesn't enable scrolling.

I modified the brilliant_gallery.module, version 5.x-3.0, by adding a second parameter for the height of the rectangle into which the full image shall be fitted, and reused the width parameter for the width of that rectangle. The prior functionality can be reached by setting both parameters to the same value.

Maybe this or similar functionality could be added to future versions of the module.

Please find the patch for version 5.x-3.0 in the attachments,
regards,
Christian.

meichr’s picture

Title: Add maximum height of large picture in settings » Resize big images using max width and HEIGHT
Version: 5.x-3.0 » 5.x-3.1
FileSize
5.43 KB

Find the patch ported to version 5.x-3.1 in the attachments.
No change to the functionality of the 5.x-3.0 patch has been done.

Regards,
Christian.

meichr’s picture

Version: 5.x-3.1 » 5.x-4.4
FileSize
4.64 KB

Here comes the same patch for module version 5.x-4.4.