Jump to content

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


khunjack

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

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.