Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
blob image - rotate image - save in mysql again - How to ???
Old 04-28-2009, 03:32 PM blob image - rotate image - save in mysql again - How to ???
Junior Talker

Posts: 2
Name: Jahn
Trades: 0
Dears,
I have images in mysql (blob).
Some of the images need to be rotated (90 degrees).

and restored in mysql.

Any hints/suggestions are very welcome.

Thanks a lot
Jack
JahnH is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-28-2009, 04:10 PM Re: blob image - rotate image - save in mysql again - How to ???
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Don't ever store big files (such as images) in a database (it's devilishly inefficient), instead just put the location of the file on the server (http wise).

To rotate the image take a look at this:
http://php.about.com/od/gdlibrary/a/rotate_image_gd.htm

If you really want to stick your image in the Database, just store the data from the string in the database field value.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 04-29-2009, 01:10 AM Re: blob image - rotate image - save in mysql again - How to ???
Skilled Talker

Posts: 84
Trades: 0
Make use of GD library and the jpgraph
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
- 1-888-869-HOST(4678)
Award winning Managed Hosting -
Please login or register to view this content. Registration is FREE

Managed Dedicated Servers. Reseller Discounts. 24/7 Impressive Tech Support
HivelocityDD is offline
Reply With Quote
View Public Profile
 
Old 04-29-2009, 02:44 AM Re: blob image - rotate image - save in mysql again - How to ???
Junior Talker

Posts: 2
Name: Jahn
Trades: 0
Thanks for the reply.

I don't have the problem to rotate the images and display.

The problem I have to save/overwrite the image back to mysql record.

e.g.:
imagecreatefromstring (..);
..
$img = imagerotate($image, $degrees, 0)
imagejpeg($img, $img_rot)

How to get $img or $img_rot back into the the db record ???


Thanks for any help.
Jahn

BTW: I have ~ 100 000 images in the database, it works very well, images are sized to fit the surfers display.
JahnH is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to blob image - rotate image - save in mysql again - How to ???
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.56702 seconds with 12 queries