Exception creating image from BMP on linux

Q:

I met an error when I try to use bitmap images into a pdf using the linux version of the PDFNetC library.ì, while I have no error in windows.
Is it normal, or I have to modify my Image::Create function?
I use this code: Image img = Image::Create(pdfDoc, ‘/usr/tmp/image.bmp’);
I’m using the 6.0.0.0 version of the library.

Exception:
Message: The image format is not directly supported on this platform.
Conditional expression: false
Filename : Image.cpp
Function : Create
Linenumber : 1530

A:
There is no direct support for bmp files on linux platform, as the exception mentions. We support JPEG, TIFF and PNG, or, if you can get the bmp data into the raw rgb data then we also have Image::Create methods for that.
Image Create(SDF::SDFDoc& doc,
const char* image_data,
size_t image_data_size,
int width,
int height,
int bpc,
ColorSpace color_space,
SDF::Obj encoder_hints = 0);

and SDF::SDFDoc& doc,
Filters::FilterReader& image_data,
int width,
int height,
int bpc,
ColorSpace color_space,
SDF::Obj encoder_hints = 0);