Rubblewebs forum
December 02, 2008, 10:53:39 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed
 
   Home   Help Search login register  
Pages: [1]
  Print  
Author Topic: Simple Resize  (Read 469 times)
wattersisere
Newbie
*
Posts: 5


View Profile
« on: July 25, 2008, 08:32:52 AM »

Hi,

I just tried to use the email form to contact you, but I don't think it has worked...
Anyway,
I'm running Xampp on Windows XP, and I'm 'learning' to use Imagemagick for a photo gallery.
I've got an 800x600 image and I want to create a small square (I'll do that part later) thumbnail. The code below should give me a 200x150 image, instead it gives 150x113. The caret is not doing it's job.

Code:
exec("convert img2.JPG -resize 150x150^ result.jpg");

What am I doing wrong?

Thanks,

Watters
Logged
Anthony
Administrator
Newbie
*****
Posts: 19


View Profile
« Reply #1 on: July 25, 2008, 08:46:48 AM »

Hello Watters

Sorry about my contact form but I have updated it to try and stop spamming. I will have a look at it later to see whats wrong; thanks for pointing it out.

The ^ was only introduced on version 6.3.8-3 so I assume your version is older than that?

If you can not upgrade you would have to do some image size checking using php and getimagesize( )

We were discussing this on the IM forum yesterday: http://redux.imagemagick.org/discourse-server/viewtopic.php?f=1&t=11750

Anthony
Logged
wattersisere
Newbie
*
Posts: 5


View Profile
« Reply #2 on: July 25, 2008, 09:23:57 AM »

Thanks for the prompt response,

I installed ImageMagick yesterday from the latest version, so I have no idea what is wrong!

And I agree totally with the php idea, it's exactly what I've done.

Thanks,

Watters
Logged
Anthony
Administrator
Newbie
*****
Posts: 19


View Profile
« Reply #3 on: July 25, 2008, 10:37:23 AM »

The other thing you could try is enclosing the size; as you are on windows you will need to use " as ' will not work.

Code:
exec("convert img2.JPG -resize \"150x150^\" result.jpg");
Logged
wattersisere
Newbie
*
Posts: 5


View Profile
« Reply #4 on: July 29, 2008, 06:02:11 PM »

Perfect!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Gold Charm by Shadow82x in association with SMF Themes © 2008
Valid XHTML 1.0! Valid CSS!