Welcome Guest, Not a member yet? Register   Sign In
(Solved) Uploading class won't resize height
#1

[eluser]markanderson993[/eluser]
I have a script that will resize a photo 4 times. Once for a full-size image, another for the profile, another for a mini profile image, and another time for a thumbnail. Everything works when the images a resized down to the correct dimensions. I also incorporated support that would allow for smaller images NOT be be resized (bloated into proportion). So here's the problem, when I upload an image 150px in width, by 50px in height, it detects the proportions and acts accordingly. However, when I upload a picture with a height of 500px and a width of 50 it fails to resize the height!

Here is my work, any help would be greatly appreciated! Thanks!

P.S. Sorry, but due to the size of the code I have to spread it out over multiple posts!
#2

[eluser]markanderson993[/eluser]
Code Removed
#3

[eluser]markanderson993[/eluser]
Code Removed
#4

[eluser]markanderson993[/eluser]
Code Removed
#5

[eluser]marcoss[/eluser]
I've found the same problem using GD2, since It was a really simple app I just switched to ImageMagik to fix it, but I'm positive it's a bug in the library, I'll see if i can check that later this week.
#6

[eluser]markanderson993[/eluser]
Great thanks, this bug has been killing me! I'll test out your solution and post the results. Thanks again for your help
#7

[eluser]markanderson993[/eluser]
I am running a mac on leopard OS X with XAMPP and I cannot for the life of me figure out how to install Imagemagick. I tried looking at this post http://ellislab.com/forums/viewthread/81675/ but it never helped. I tried installing xampp again hoping it would have the correct support for imagemagick, couldn't find any. Argh! There are practically no posts about this on google, does anyone know how to install Imagemagick on a mac Xampp?
#8

[eluser]marcoss[/eluser]
Try using MacPorts (http://www.imagemagick.org/script/binary...php#macosx)
#9

[eluser]markanderson993[/eluser]
Well I'm just about ready to pull my hair out, I downloaded and installed MacPorts. Thats all good and fine but when I try and run the sudo port, it says it was not a command or gave some sort of bash unrecognized error. So apprently that not working, I went on to installing the binary version into the /Users/myname directory. And so I got though the entire procedure and everything worked great and I got the nice picture at the end (make logo.gif or whatever). Then I try running my upload script with the ImageMagick library_path set to /Users/myname/ImageMagick-6.4.2 but of course I get the same error: "Image processing failed. Please verify that your server supports the chosen protocol and that the path to your image library is correct."

Xampp is installed in the Applications folder (/Applications/Xampp/) and ImageMagick is installed in the /Users/myname/ folder (Note: myname is just the sub I'm using for what what I really input there).

If anyone has any idea whatsoever on installing ImageMagick and allowing to comply with CodeIgniter please please please post.

Thanks a bunch,
Mark

-------------------------


SOLUTION! Alright well apparently the solution is to turn maintain_ratio to FALSE. Hope this helps anybody else with the same issue!

- Mark




Theme © iAndrew 2016 - Forum software by © MyBB