Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZoomCrop not working for me at least. #51

Open
halles opened this issue Jul 2, 2010 · 1 comment
Open

ZoomCrop not working for me at least. #51

halles opened this issue Jul 2, 2010 · 1 comment

Comments

@halles
Copy link

halles commented Jul 2, 2010

Hi,
i have a working configuration for using this behaviour. I am using phpThumb to generate the thumbnails and everthing works fine except I'm trying to create cropped thumbnails using ZoomCrop => true in the model, but it won't crop, it will just resize the files.

This is my model $actAs configuration, hope it helps.

var $actsAs = array(
    'MeioUpload' => array(
        'avatar' => array(
            'Empty' => array(
                'check' => false
            ),
            'useTable' => true,
            'createDirectory' => false,
            'dir' => '_users_files/_avatars',
            'maxSize' => 2097152,
            'allowedMime' => array('image/jpeg', 'image/pjpeg', 'image/png', 'image/gif'),
            'allowedExt' => array('.jpg', '.jpeg', '.png', '.gif'),
            'zoomCrop' => true,
            'thumbsizes' => array(
                'normal' => array('width' => 200, 'height' => 300),
                'medium' => array('width' => 100, 'height' => 100),
                'small' => array('width' => 50, 'height' => 50),
                'nano' => array('width' => 30, 'height' => 30)
            )
        )
    )
);

Thanks!

@halles
Copy link
Author

halles commented Jul 2, 2010

So now, after reading branch 3 readme i learned that you have to specify how you want phpthumb to crop and not just use true. I blame it on the docs :p

That leads me to a question: Is it posible to do simple cropping instead of zoomcropping? I have some avatar that i would like to have a fixed width but just a max height, i don't care about how high is the picture even it leads me to have a 200x20 pic (as an example).

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant