Cannot rotate images

See all posts See thread Reply

Re: Cannot rotate images new!
by colin, 8 years, 8 months ago
Does it work if you resize by 90 degrees for instance?Reply
Re: Cannot rotate images new!
by Keith Taylor, 8 years, 8 months ago
I tried 90 and 270 degrees - still no rotate.

As for the permissions on the file - I'm not sure who the owner of the file is or the name of the user who is trying to change it. I assumed that because the class had uploaded and written the file ( after resizing ) there would be no subsequent problems with permissions.

I note on the log that it says: file_dst_path : n/a . Is that relevant ?Reply
Re: Cannot rotate images new!
by colin, 8 years, 8 months ago
Can you try the test procedure in the test/ directory? Runthe test in the section "Image local manipulation".

In the tests, there are some rotations. Are they working?Reply
Re: Cannot rotate images new!
by Keith Taylor, 8 years, 8 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, 8 years, 8 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, 8 years, 8 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, 8 years, 8 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, 8 years, 8 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, 8 years, 8 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