Jump to content

blob image - rotate image - save in mysql again - How to ???


Recommended Posts

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

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

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.