CodeIgniter Forums
the perfect image thumbs? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: the perfect image thumbs? (/showthread.php?tid=13357)



the perfect image thumbs? - El Forum - 11-19-2008

[eluser]Asinox[/eluser]
Hi, i want to ask how ill make the perfect thumbs image?

im trying to control the $config['master_dim'] = 'width', but how ill make some control over height?

some tips?

thanks


the perfect image thumbs? - El Forum - 11-19-2008

[eluser]dmorin[/eluser]
You're not really giving us much to go on. Are you just trying to resize? Or are you trying to crop and resize so they're a certain aspect ratio? Please explain exactly what you're trying to do.


the perfect image thumbs? - El Forum - 11-19-2008

[eluser]Asinox[/eluser]
just im trying to resize, because if i try to crop the crop sometime crop "wrong" (i think)

*sorry with my english

thank u


the perfect image thumbs? - El Forum - 11-19-2008

[eluser]dmorin[/eluser]
Sorry, no idea what most of that means. The user guide has some detailed instructions for resizing. http://ellislab.com/codeigniter/user-guide/libraries/image_lib.html

Once you get some code written, post it here so we can see and tell us what is not working.


the perfect image thumbs? - El Forum - 12-11-2008

[eluser]JoostV[/eluser]
Square images make good thumbs. It is not hard creating them using the CI image library.

However, without user interaction you will always have to crop from a default position. (e.g. the center) This can leave you with some ugly looking thumbs.

I stumbled upon a jQuery image upload and crop thing. It lets the user select which area to crop after uploading, so they can create their own thumb. Pretty cool stuff! Might be good for you.

PS if you adapt this to CI please post back, so we can all use it Smile

Code: http://www.webmotionuk.co.uk/jquery-image-upload-and-crop-for-php/
Example: http://www.webmotionuk.co.uk/jquery/jquery_upload_crop.php
(in this demo you can upload images to 10K only)


the perfect image thumbs? - El Forum - 12-11-2008

[eluser]dmorin[/eluser]
I agree that square images make good thumbnails. I'm currently using this image cropper with prototype on my site:

http://www.defusion.org.uk/demos/060519/cropper.php

The output values it provides match exactly what's required for the CI cropping functions.


the perfect image thumbs? - El Forum - 12-11-2008

[eluser]JoostV[/eluser]
@dmorin very cool indeed!