Tekforums

Chat => Entertainment & Technology => Topic started by: neXus on September 14, 2006, 16:22:42 PM

Title: Images and php
Post by: neXus on September 14, 2006, 16:22:42 PM
Anyone know if its possible not to just create a thumbnail which I know how to do but only capture part of an image

So say you have a 500 by 500 image and you create a thumbnail but have only a 50 by 50 top right cut of that image to create a sqaure thumbnail which does not show the whole image and is a bit abstract as a result.

Lots of galleries around have it but must be by hand unless there is a server side way to do it.. any ideas?
Title: Re:Images and php
Post by: M3ta7h3ad on September 14, 2006, 17:54:48 PM
There must be mate. Surely imagemagik or GD can do it. but unfortunately Ive no idea.
Title: Re:Images and php
Post by: TRB on September 15, 2006, 12:40:49 PM
Yes, use ImageMagick (http://www.imagemagick.org/) to crop and resize the original.
Title: Re:Images and php
Post by: neXus on September 16, 2006, 11:45:35 AM
Quote from: TRBYes, use ImageMagick to crop and resize the original.

cheers, this installed can handle it and then allow php code use on a server but I cant install this on servers really.

Got to mega read up on image manipluation in php I think. Simple cropping will do i think
Title: Re:Images and php
Post by: M3ta7h3ad on September 16, 2006, 12:02:00 PM
most servers will actually have it installed anyway as its way bloody better than GD. Check PHPinfo for installed modules! :)
Title: Re:Images and php
Post by: neXus on September 16, 2006, 12:10:32 PM
http://5thdigital.com/phpinfo.php


I think I may have just figured out a way actually that would be simple browser compatable and not involve php, will give it a go later.

Im thinking using my current gallery thing I am buidling, create the thumbnials and images and place in the gallery windows as normal, they all witht he right hieght but different widths of course, But If I tell the containing Div to only be a fixed certain size for the top corner of the image It should show a croped partial image
Title: Re:Images and php
Post by: M3ta7h3ad on September 17, 2006, 10:21:17 AM
Quote from: neXushttp://5thdigital.com/phpinfo.php


I think I may have just figured out a way actually that would be simple browser compatable and not involve php, will give it a go later.

Im thinking using my current gallery thing I am buidling, create the thumbnials and images and place in the gallery windows as normal, they all witht he right hieght but different widths of course, But If I tell the containing Div to only be a fixed certain size for the top corner of the image It should show a croped partial image

Appears you have GD installed but no imagemagick. :(

Probably possible using GD. Im amazed you dont even have EXIF support enabled. Hmmmm thats poor.