tags:

views:

42

answers:

1

Hi i am writing a converter from Oracle to mysql

In Oracle the images are stored in db.

I want to read the content of the image and save to file system

I suppose that i have to read the blob entry and using php file commands create the file (am i right)

What about image type. Should i save as jpg (what if the store image is not jpg)

Any suggestion are welcome

A: 

you can write the blob directly to a file on disk. you can exclude the file extension from the name if you don't have that information somewhere in the db or the app. you could also deduce the content type by using the unix file command if you really need to assign an extension.