khunjack Posted April 28, 2009 Share Posted April 28, 2009 Dears, I have images in mysql (blob). Some of the images need to be rotated (90 degrees). Not sure how to do it. Do I have to physical write the image? (I did that and was using 'imagerotate' -> image rotated, but couldn't manage to store the rotated images back into mysql.) Can the blob be rotated?? Any hints/suggestions are very welcome. Thanks a lot Jack Quote Link to comment https://forums.phpfreaks.com/topic/155993-blob-image-rotate-image-save-in-mysql-again-how-to/ Share on other sites More sharing options...
khunjack Posted April 28, 2009 Author Share Posted April 28, 2009 PS: The image is on the server root .... the issue is to store it back into mysql Thanks Quote Link to comment https://forums.phpfreaks.com/topic/155993-blob-image-rotate-image-save-in-mysql-again-how-to/#findComment-821282 Share on other sites More sharing options...
Mchl Posted April 28, 2009 Share Posted April 28, 2009 What is your code? What are the errors you get? Quote Link to comment https://forums.phpfreaks.com/topic/155993-blob-image-rotate-image-save-in-mysql-again-how-to/#findComment-821284 Share on other sites More sharing options...
khunjack Posted April 29, 2009 Author Share Posted April 29, 2009 Mchl, Thank you for your reply. $aRow = $this->getPicture($sPicId); . $src = @imagecreatefromstring ($aRow["Bin Data"]); $image = imagecreatetruecolor (...); imagecopyresampled (...); . . $rotate = imagerotate($image, $degrees, 0) ; imagejpeg($rotate, $imagename2) ; now I have the rotated pic in '$imagename2' in the server root Up to now could not manage to store the rotated image back into mysql. Tried a few things, honestly I don't have a glue, e.g. stored the $rotate, $imagename2 in the blob ["Bin Data"] field... etc... Thank you Jack Quote Link to comment https://forums.phpfreaks.com/topic/155993-blob-image-rotate-image-save-in-mysql-again-how-to/#findComment-822048 Share on other sites More sharing options...
Mchl Posted April 29, 2009 Share Posted April 29, 2009 What did you try? Quote Link to comment https://forums.phpfreaks.com/topic/155993-blob-image-rotate-image-save-in-mysql-again-how-to/#findComment-822054 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.