Cannot rotate images

See all posts See thread Reply

Re: Cannot rotate images new!
by Keith Taylor, 9 years, 3 months ago
Hi Colin

Yes - ALL the tests on that test page are working OK on this machine. Strange !

I looked at your script and noticed that degrees are quoted i.e.
$handle-0>image_rotate='180';
so I did the same in my script, but it made no difference.

Time for some serious head scratchingReply
Re: Cannot rotate images new!
by colin, 9 years, 3 months ago
Yes, I am not sure what is going on... You can try to debug the class, ar do some more tests of your code, with different image formats, sizes, types, etc...Reply
Re: Cannot rotate images new!
by Keith Taylor, 9 years, 3 months ago
It is strange - but there must be a logical explanation. I will play around and see what I can do. I'll post here when I find the solution

Many thanks for your time
KTReply
Re: Cannot rotate images new!
by Keith Taylor, 9 years, 3 months ago
In your demo you don't actually write the modified file back to the disk - you just show it. Do I need to use another method to actually save the file after processing ?Reply
Re: Cannot rotate images new!
by Keith Taylor, 9 years, 3 months ago
Got it !
$handle->image_rotate = '90';
$handle->file_overwrite = true;
$handle->process('images/small');

You have to quote the file path in the process method. Not intuitive, as the class already knows the full path from when it is instantiated.Reply
Re: Cannot rotate images new!
by colin, 9 years, 3 months ago
I should have caught that in your code... Indeed, you need the path when calling process(), as an absolute or relative path.

If you call process() without an argument, it outputs the image directy to the browser. It is documented hereReply