Suggestion for Better Picture Manager

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 năm cách đây
This is actually not my fix, but another member gave it to me.  I think it would be a great thing for future versions of nop.

Basically, it uses the PNG Codec to make the thumbnail images.  It appears to give better picture quality and allows for transparent images.
13 năm cách đây
Can you share the code?
13 năm cách đây
This is the same workaround for transparent images for version 1.5
Its just this one additional line of code in PictureManager.cs:

       private static ImageCodecInfo getImageCodeInfo(string mimeType)
       {
           mimeType = "image/png"; // ******* Override to force PNG Codec

           var info = ImageCodecInfo.GetImageEncoders();
           foreach (var ici in info)
               if (ici.MimeType.Equals(mimeType, StringComparison.OrdinalIgnoreCase))
                   return ici;
           return null;
       }
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.