LibJpeg.Net is ready for download


after months of development LibJpeg.Net is ready.

LibJpeg.Net is a fully managed development library written using c#. Library based on classic LibJpeg 6b from Independent JPEG Group.

We’ve released LibJpeg.Net under very permissive BSD-like license. You can use LibJpeg.Net in open source and commercial application or library free of charge. Please read full license text on this page.

You can get full source code (with tests and test images) here or already built binaries (for .NET Framework 2.0 and newer) here.

We really want to hear from you. Please write us about any found bugs, send your suggestions or ask questions if you have any.

12 Responses to “LibJpeg.Net is ready for download”

  • I tried it. I liked the way it works. However, it’s terribly slow! It takes seconds to load a 3 Mpixel image, something that even GDI+ can do in far less time.

    NProf shows that most of the time is indeed spent inside the library; it’s not my byte shuffling that’s being inefficient.

    Are there any plans on improving performance?

  • Thank you for your comment, Thomas.

    Sure, we are planning to do some performance-related improvements.
    It’s the first version after all 🙂

    Did you try BitMiracle.LibJpeg.JpegImage or BitMiracle.LibJpeg.Classic.jpeg_decompress_struct ?

  • Is there any code samples for silverlight. I can get it to compile as silverlight by replacing Bitmap to BitmapImage in JpegImage.cs but im hitting error during the initization source stream.

  • Hello slyi,

    Unfortunately there is no Silverlight-specific samples as yet.
    You may write us an e-mail and I will try to help you. Please consider attaching some test code and/or images to the e-mail.

  • Vitali Anselm


    thank you for developing the C# wrapper for jpeglib. It is the only one I have found on the Internet.

    As far as I can see, it is based on the older version (6b) of jpeglib, where no jpeg_mem_dest was available, but only jpeg_mem_stdio. Do you plan to update your framework soon?

    best regards,


  • Hello Vitali,

    We do plan to update LibJpeg.Net but have no specific timeframe for that. We are welcome any help, by the way.

  • Vitali Anselm

    Hello Sergius,

    meanwhile I have extended your library with my memory destination and memory source codes and I have tested it successfully with my example application. If you want, I can mail the source code to you. If so, give me your email address please.

    best regards

  • Is it somehow possible to set the chroma subsampling to 1:1:1 when encoding an image with the JpegImage class?

    I see the V/H_samp_factor properties in the jpeg_compress_struct but how are these actually used with the BitMiracle.LibJpeg.JpegImage class?

  • Hello Kim,

    Unfortunately, there is no way to set chroma subsampling when using JpegImage class.

    You might want to use classic interface for this or adapt JpegImage class to your needs. In a latter case please consider sharing your code with us and other users of the library.

  • Hi Sergius,
    Is the latest version of LibJpeg.Net is available?

  • Yes, the latest version of LibJpeg.Net is published on our site.