How get correct RGB? No need auto levels

Hi, i need decode raw to rgb.
My code

 
LibRaw imageProcessor;
imageProcessor.open_buffer(...);
imageProcessor.unpack();
imageProcessor.dcraw_process();
int err;
libraw_processed_image_t* img = imageProcessor.dcraw_make_mem_image(&err);

It work. But source raw file is dark, dcraw_make_mem_image is light ((

Forums: