I spent a week on this, I cannot for the life of me get Imagerotate to work! The software code from a big shipping company sends my server a label image that looks like this:
echo ‘’;
I needed 2 things done:
1.) The image saved
2.) The image displayed rotated.
So I thought I’d save it in my label directory, first, with these 2 lines of code:
$rawData=base64_decode($label_image);
file_put_contents(‘labels/’. $unique_id . ‘.png’, $rawData);
Am I doing at least that part right? It seems to work.
But then… I can’t get it to rotate! I’ve tried every permutation of “imagerotate()” without it working. Ugh!
And, also, I don’t know if I should rotate it first, before saving… or, save it as is, and then rotate the displayed image.
I could get the image to rotate using CSS… that’s no problem. But I would rather use PHP, and not CSS.
Would someone be kind enough to provide the line(s) of code to make this work for this dumb tennessee girl who’s trying to learn PHP in a man’s world? :o