Cataloger Item Image on Category Page

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
delve2013
Forum Members
Forum Members
Posts: 91
Joined: Thu Jan 31, 2013 4:23 pm

Cataloger Item Image on Category Page

Post by delve2013 »

I want to be able to control the height of the item image shown on the category page. By default you can only control the width and not the height. Anyone know how I can fix this? I'm assuming I would need to edit the cataloger.Image.php file but I'm not sure what to change.

I think it has something to do with this section of code:

Code: Select all

function imageTransform($srcSpec, $destSpec, $size, &$config, $aspect_ratio='')
    {
        require_once(dirname(__FILE__).'/../../lib/filemanager/ImageManager/Classes/Transform.php');

        $it = new Image_Transform;
        $img = $it->factory($config['image_manipulation_prog']);
        $img->load($srcSpec);
        if ($img->img_x < $img->img_y)
            {
            $long_axis = $img->img_y;
            }
        else
            {
            $long_axis = $img->img_x;
            }

        if ($long_axis > $size)
            {
            $img->scaleByLength($size);
            $img->save($destSpec, 'jpeg');
            }
        else
            {
            $img->save($destSpec, 'jpeg');
            }
        $img->free();
    }
The alternative would be to use CGSmart Image but I'm getting the following error when trying to use it:

Code: Select all

Could not find a file at: http://176.32.230.29/intricatecreations.co.uk/modules/Cataloger/Cataloger.Image.php?i=cascading-flowers_s_1_220_1.jpg&ac=83613
User avatar
Tetsuo
Forum Members
Forum Members
Posts: 58
Joined: Wed Aug 19, 2009 12:00 pm
Location: UK

Re: Cataloger Item Image on Category Page

Post by Tetsuo »

I would suggest that you set the width value in the Cataloger settings (as you mention) so that it proportionally creates the desired height value of the image. Try opening an image file in Photoshop (or similar) and resize it with proportions constrained to see what I mean and find the required width value.

Otherwise you could use CSS to force the height to a particular value?
Post Reply

Return to “Modules/Add-Ons”