Based on your comments on another answer, you can try this to perform a conversion on an image that is stored in byte[] , and then return the result as another byte[] .
public byte[] TransformImage(byte[] imageData) { using(var input = new MemoryStream(imageData)) { using(Image img = Image.FromStream(input)) {
This will allow you to go through the byte[] stored in the database, perform all necessary conversions, and then return a new byte[] , which can be stored in the database.
Adam Robinson Jul 20 '10 at 13:31
source share