August 8, 2012 at 1:21 am
The job is to extract the photos from the SQL table into .jpg format.
I have created an SSIS package and used an Export column to extract the photos. I used a derived column to give the extention as .jpg
Apparently , even though the photos are being extracted with an extension of .jpg , its actually not .jpg but .bmp.
Any idea how we extract the photos in valid .jpg format ?
August 8, 2012 at 1:46 am
Was the binary data uploaded as a jpg or a bmp?
August 8, 2012 at 2:51 am
I am afraid I dont know .. thats the legacy data ..
August 8, 2012 at 3:07 am
Well more than likely was inserted as BMP, so you would need to extract them and convert them in a picture editor and re-upload them to the DB.
August 8, 2012 at 4:03 am
Yeah agree.. but imagine if we have almost 500K pictures to convert .. What would be the best approach then ?
August 8, 2012 at 4:07 am
cant help you on that, thought it would have to be manually 1 by 1 as you will need to open the files and save them as jpg then re-upload
August 8, 2012 at 4:27 am
You'd have to either:
1) Use a script transformation task (this is just pure .Net code), then just use one of the examples of converting a bmp file to a jpg in code
2) Save them as a .bmp, then shell out to a command line utility to do the same thing
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply