Last post Jun 29, 2015 03:08 PM by rstrahl
Jun 21, 2012 12:08 AM|ravi010mittal|LINK
I am using Generic Handler to Load Images. I am converting TIFF images to PNG Format. Now i need to compress the size of the PNG Image not the quality. Please suggest me the best free Image Compressor SDK.
Please let me know asap
Jun 21, 2012 12:14 AM|sunilgurjar|LINK
Jun 22, 2012 12:15 AM|ravi010mittal|LINK
Thanks for Reply...I do not want to specify any new size of image. Can we compress the original image with Original Size ?
Jul 03, 2012 03:31 AM|ravi010mittal|LINK
Please let me know if there is any lossless image Compression algorithem in Asp.NET
Jul 03, 2012 03:43 AM|mshoaiblibra|LINK
Please suggest me the best free Image Compressor SDK.
you should use 7z sdk to compress and decompress a file:
More help full metrial:
Jul 04, 2012 12:55 AM|ravi010mittal|LINK
How can i compress image using 7z. I think you not getting my question. When i am loading image from network i am getting TIFF image now i am converting TIFF to PNG and it takes 3.52 Sec to load image. I need to decrease that loading amount. I need to compress
the image size not the quality....
Feb 04, 2015 04:47 PM|marc_aurel|LINK
just came across this: One good strategy "to compress PNG" files is converting them into jpg since PNG compression is very limited in most cases and based on removing obsolete header information etc. With JPG you can reach a very high comrpession level which
is what you want to have fast websites. A good service to convert png to jpg is the following one: It also allows multiple files
I use it for all my projects.
Apr 17, 2015 05:08 AM|rstrahl|LINK
There are a number of utilities out there to optimize PNG images like PNGOUT and OptiPng that are command line utilities. You can shell out from your ASP.NET app and call these to compress your images in place. Note though these tend to be pretty slow -
it can take a while to optimize large images.
However - TIFF images tend to be photos or photo-quality art, so generally PNG is not a good format for that. The problem is that PNG is lossless and it's not very good at very high res detailed content. You can *optimize* PNG by removing colors and transparency,
but there's no way to 'compress' PNG.
For photo-quality images if you want decent compression use JPEG or JPEG2000 (although that's not supported widely). Then play around with different image compression ratios. You can do JPeg compression with GDI+ if necessary or there are also command line
utilities to do it for you.
This StackOverFlow question lists a bunch of tools you can try:
+++ Rick ---
Jun 29, 2015 03:08 PM|rstrahl|LINK
Not a simple thing to do and it's very slow.
The way I've done this is by shelling out to a tool like PngOut.exe to let it do the compression. Here's what I do on my blog with post images uploaded as part of my MetaWebLog API media uploads:
// png gets written here
if (Path.GetExtension(ImagePhysicalPath).ToLower() == ".png")
var pngOutPath = HttpContext.Current.Server.MapPath("~/") + "tools\\pngout.exe";
var p = Process.Start(pngOutPath, "\"" + ImagePhysicalPath + "\"");
p.ErrorDataReceived += (sender, e) =>
LogManager.Current.LogError("pngOut failed", e.Data);
It works great, but it's pretty slow - all the compression tools I've seen and used are this slow so this inherent to the process of optimizing PNG in a lossless manner.
Hope this helps,