本文整理汇总了C++中LibRaw::copy_mem_image方法的典型用法代码示例。如果您正苦于以下问题:C++ LibRaw::copy_mem_image方法的具体用法?C++ LibRaw::copy_mem_image怎么用?C++ LibRaw::copy_mem_image使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LibRaw
的用法示例。
在下文中一共展示了LibRaw::copy_mem_image方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadMaster
Image ImageLoader_raw_p::loadMaster ()
{
/**
* Custom raw import:
* half_size = 1
* document_mode = 2
* gamma[0] gamma[1] = 1
*/
// Skip debayer for now
m_rawProcessor.imgdata.params.half_size = 0;
m_rawProcessor.imgdata.params.document_mode = 0;
m_rawProcessor.imgdata.params.use_camera_wb = 1;
m_rawProcessor.imgdata.params.use_auto_wb = 0;
m_rawProcessor.imgdata.params.med_passes = 0;
m_rawProcessor.imgdata.params.no_auto_bright = 1;
m_rawProcessor.imgdata.params.output_color = 1; // sRGB
m_rawProcessor.imgdata.params.output_bps = 16; // 16 bits
m_rawProcessor.unpack();
// Use AHC bayer interpolation
m_rawProcessor.imgdata.params.user_qual = 1;
m_rawProcessor.imgdata.params.threshold = 100;
if (m_rawProcessor.imgdata.other.iso_speed)
m_rawProcessor.imgdata.params.threshold = m_rawProcessor.imgdata.other.iso_speed / 8; // TODO /8 beter?
m_rawProcessor.dcraw_process();
int mem_height = 0;
int mem_width = 0;
int mem_channels = 0;
int mem_bits_per_pixel = 0;
m_rawProcessor.get_mem_image_format(&mem_width, &mem_height, &mem_channels, &mem_bits_per_pixel);
QSize size (mem_width, mem_height);
qDebug () << "Create rawprocessor image:";
qDebug () << mem_width << mem_height << mem_channels << mem_bits_per_pixel;
Image image (size, mem_channels, size.width() * mem_channels * mem_bits_per_pixel, mem_bits_per_pixel);
// image.setMaxValue( m_rawProcessor.imgdata.color.maximum );
m_rawProcessor.copy_mem_image(image.pixels(), image.step(), 0);
return image;
}