Error on load some jpg images

May 3, 2010 at 7:07 PM

I get error on load some random images. link to sample image

The error is:
The method or operation is not implemented.

Stack trace:
   at ImageTools.IO.BufferedStream.Seek(Int64 offset, SeekOrigin origin)
   at FluxJpeg.Core.Decoder.JpegDecoder.Decode()
   at ImageTools.IO.Jpeg.JpegDecoder.Decode(Image image, Stream stream)
   at ImageTools.Image.DoLoad(Stream stream)

May 8, 2010 at 7:57 PM
Which version do you use?
Jul 8, 2010 at 1:09 PM

I've also gotten this exception with the .2 version.  It appears that for Jpgs with a jpg marker of DRI (define restart interval), the code is attempting to do a seek on the buffered stream which has not implemented the method.  Commenting out the line and following through to the next did not work.

Jul 14, 2010 at 7:02 PM
Sorry, that I could not answer immediatly. I will have a look as far as I have time. But the jpeg support is from a third party library, so I dont know If I can fix it.
Aug 18, 2010 at 12:50 PM

It's not the jpeg library but the BufferedSream. You just have to provide some basic implementation of the seek method. This works for me:

public override long Seek(long offset, SeekOrigin origin)
    if (_position + offset <= _baseStream.Length)
        _position += (int)offset;
        _baseStream.Position = _position;

    return _position;

Sep 9, 2010 at 11:10 AM

Thanks a lot, will check it and include it in the next release which is coming at least end of next week.