[opencms-dev] Photo album overview to crop images

Yves Glodt yg at mind.lu
Fri Jul 9 15:20:38 CEST 2010


I tried the following code down here in the template of my photoalbum.
Unfortulately it fails with:

"The method setDetailImageScaler(CmsImageScaler) from the type
CmsPhotoAlbumConfiguration is not visible"

Anybody got a hint for me... :-) ?

Best regards,
Yves


*CmsImageScaler scaler = new CmsImageScaler();
scaler.setQuality(90);
scaler.setType(2);
scaler.setCropArea(0,0,80,80);


CmsPhotoAlbumConfiguration configuration = new CmsPhotoAlbumConfiguration();
configuration.setDetailImageScaler(scaler); // it fails here

cms.setConfiguration(configuration);
//cms.getConfiguration().getDetailImageScaler().setType(2);
//cms.getConfiguration().getDetailImageScaler().setCropArea(0,0,80,80);

*...

cms.displayAlbum();




On 6 July 2010 09:57, Yves Glodt <yg at mind.lu> wrote:

> Bumping...
>
> In fact, to clarify, I need to show the images in the gallery overview in a
> square shape (100x100px), not rectangle.
>
> Doing some research I found that I can probably edit the template used for
> the photo album and create a custom instance of CmsImageScaler.
>
> Is that possible? Are there any examples around?
>
> Best regards,
> Yves
>
>
> On 22 June 2010 10:28, Yves Glodt <yg at mind.lu> wrote:
>
>> Hello,
>>
>> is it possible to have the photoalbum crop the images in the overview?
>> (I have a situation where the overview should have square images only.)
>>
>> Best regards,
>> Yves
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100709/2c8bb2c3/attachment.htm>


More information about the opencms-dev mailing list