General discussion

Locked

Compressing Images

By preethiraajesh ·
Hello,

Anyone know how to compress the images(in asp.net) which is uploaded in sql server database so that I need not worry about the disk space?I don't know :-??

If anybody is having any idea then please do share your knowledge.
I would really appreciate if someone provide code for it.
Its very urgent for me.
Waiting for your valuable suggestion :-w

Thanks

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

About image compressing

by DarknessAndHope In reply to Compressing Images

First of all why are you interested in compressing an image? Is it because you need to present it in different sizes?

And how about accessing the image? Will it be frequently accessed or just from time to time?

I think you know that sometimes you won't get much benefits from compressing image formats that are originally compressed by nature like .jpg or .gif

Collapse -

Reason Why I want Image Compression

by preethiraajesh In reply to About image compressing

hello,

There may be billions of files(pdf or tiff format) that has to be stored in database table/ server folder. So in order to save space I need it.
File has to be uploaded day to day basis. Whenever required it has to be retrieved.
Do you know any other way other than compressing, in my opinion compressing is the only way.

Expecting your immediate response.

Thanks
Preethi

Collapse -

Net 2.0

by onbliss In reply to Reason Why I want Image C ...

...offers System.IO.Compression namespace that provides methods to compress and decompress streams. So you would read your images/pdfs as streams, then compress them using the methods, and then write them to a BLOB field in SQL Server.

Personally, I have not yet used the namespace yet. So my information is based on the MSDN help. But, I am positive that some of the third party tools are better at the compression and there might be some limitations in the .Net compression namespace. You need to check them out.

good luck!!!

Collapse -

Compression Technics

by preethiraajesh In reply to Net 2.0

Hello,

Thanks alot for ur valuable advice.

Preethi

Collapse -

Image compression

by DarknessAndHope In reply to Reason Why I want Image C ...

Preethi,

As onbliss posted there is System.IO.Compression namespace on .NET 2.0, but i recommend you to search also on www.codeproject.com, there are some free solutions and probably you'll find one there that does exactly what you need it to do, you just need to waste some time looking around...

If you're working with large tiff and pdf files i can only advise you to use a server folder rather than upload the files to the database, since reading and writing those files into a table may cause an huge overhead on a sql server database.

Good luck!

Collapse -

Two minds

by onbliss In reply to Image compression

Actually I was thinking about the same thing - storing of the files. Was storing the files in SQL Server a better option than storing them just on a folder? Having them in SQL database adds a layer of complexity, but makes the files little more "available" to other applications in an enterprise. Don't you think so?

Collapse -

Compressing images feedback

by preethiraajesh In reply to About image compressing

hello,
Preethi here, I'm still working on that; now I'm studying various algorithms for the compression.

If I get a solution I'll definetly post it.
I think I'll master in image manipulations

Thanks

Collapse -

Another resource

by DarknessAndHope In reply to Compressing Images

Preethi,

A friend of mine used this http://www.icsharpcode.net/OpenSource/SharpZipLib/, check it out.

Good luck!

Collapse -

Thanks

by preethiraajesh In reply to Another resource

Hello,

Thanks a lot For ur valuable advice. I'll expore this site & also codeproject site.

Preethi

Back to Web Development Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums