How to call a jpeg.Image (compressed) into a report (SQL Server 2012)

  • Hello

    The application lets user upload a picture which gets saved into the 'Attachments' table. The file is saved in VARBINARY(MAX) and IsCompressed. Since it is SQL Server 2012, COMPRESS AND DECOMPRESS are not applicable. I am following a general method in SSRS for inserting an image from Database and getting an error, my guess would be because it is compressed. I have not worked with Images which are large size and compressed. 

    I have attached a snapshot of 1 record from attachments table.

    Any advice or recommendations are appreciated.

  • Any thought anyone?

  • SQLPain - Thursday, June 7, 2018 10:57 AM

    Any thought anyone?

    How did it get compressed when it was inserted?   If you are looking to have the picture show up in SSRS, I'm pretty sure it has to not be compressed, so you'll have to uncompress the data with a similar technique to how it was compressed in the first place.   Processing time for that kind of thing usually makes the compression not worth the trouble, as you are already spending resources just reading that much data, never mind decompressing it.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply