Image resize on JPGs - resized image appears as tiny thumb on black background |
[eluser]w1ntermut3[/eluser]
Using resize as: Code: $config['image_library'] = 'gd2'; I upload a 797 x 1024 image, and expect it to be resized down to 250 wide, maintaining aspect ratio. What I get is this: http://www.bencasey.co.uk/resize-wrong.jpg Well, it's got the aspect ratio right I guess. The image IS 250 wide, and a corresponding height. However, most of the image is, in fact, not my image at all but a large expanse of black, with the actual image - at the correct aspect ratio - confined to a tiny thumb area at the top. There seem to be a few posts regarding unwanted black backgrounds, but they're working with GIF/PNG transparency. This is on JPGs. Why is it doing this, and how do I stop it?
[eluser]w1ntermut3[/eluser]
What? I don't even... never mind. Thanks for your input.
[eluser]meigwilym[/eluser]
Have you tried it without specifying the height? I've had niggles like this with image resizing before, ofgen it's to do with the server. Mei
[eluser]w1ntermut3[/eluser]
Yep, tried with no height set, with height set to 100, with no master_dim set, with master_dim set to auto, with maintain_ratio true and false... I just get a variation on the theme of "resized original on a black background". I've given up and done it natively, BTW. This works fine: Code: $canvas = imagecreatetruecolor($new_width, $new_height); |
Welcome Guest, Not a member yet? Register Sign In |