I am trying to convert a TIFF file to JPEG using FreeImage.
The problem is that FreeIamge.SaveToStream actually does nothing. Even after the call, stream has Length , Capacity and Position 0.
This is my code:
using (var stream = new MemoryStream()) { var image = FreeImage.LoadEx(fileName); FreeImage.SaveToStream(image, stream, FREE_IMAGE_FORMAT.FIF_JPEG, FREE_IMAGE_SAVE_FLAGS.JPEG_QUALITYSUPERB);
What am I doing wrong?
source share