I'm struggling with FreeImage and the documentation is not helping me a lot!
I need to display a tif, an exr or an HDR image in a picturebox with C# and I'm not succeeding and I wonder how can I do it... I'm getting the error: Only bitmaps with type of FIT_BITMAP can be converted. ...
Can anyone help me with it ? I suppose I have to convert the tiff to a bitmap but I've tried but I don't know how I should do it yet ... Here is my code:
FIBITMAP imageToDisplay = new FIBITMAP();
imageToDisplay = FreeImage.Load(FREE_IMAGE_FORMAT.FIF_TIFF, i, FREE_IMAGE_LOAD_FLAGS.TIFF_CMYK);
Bitmap bitmap = FreeImage.GetBitmap(imageToDisplay);
pictureBox.Image = (Image)new Bitmap(bitmap);