Ejemplo n.º 1
0
void KIGPDialog::writeConfig()
{
 KConfigGroup group = m_config->group("Look");
 group.writeEntry("ImagesPerRow", getImagesPerRow());
 group.writeEntry("ImageName", printImageName());
 group.writeEntry("ImageSize", printImageSize());
 group.writeEntry("ImageProperty", printImageProperty());
 group.writeEntry("FontName", getFontName());
 group.writeEntry("FontSize", getFontSize());
 group.writeEntry("ForegroundColor", getForegroundColor().name() );
 group.writeEntry("BackgroundColor", getBackgroundColor().name());

 group =m_config->group("Directory");
 group.writeEntry("RecurseSubDirectories", recurseSubDirectories());
 group.writeEntry("RecursionLevel", recursionLevel());
 group.writeEntry("CopyOriginalFiles", copyOriginalFiles());
 group.writeEntry("UseCommentFile", useCommentFile());

 group = m_config->group("Thumbnails");
 group.writeEntry("ThumbnailSize", getThumbnailSize());
 group.writeEntry("ColorDepth", getColorDepth());
 group.writeEntry("ColorDepthSet", colorDepthSet());
 group.writeEntry("ImageFormat", getImageFormat());
 group.sync();
}
Ejemplo n.º 2
0
freeimage::ImagePtr FrameBuffer::getImage()
{
#ifdef BRAYNS_USE_FREEIMAGE
    map();
    const auto colorBuffer = getColorBuffer();
    const auto& size = getSize();

    freeimage::ImagePtr image(
        FreeImage_ConvertFromRawBits(const_cast<uint8_t*>(colorBuffer), size.x,
                                     size.y, getColorDepth() * size.x,
                                     8 * getColorDepth(), 0xFF0000, 0x00FF00,
                                     0x0000FF, false));

    unmap();

#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
    freeimage::SwapRedBlue32(image.get());
#endif
    return image;
#else
    return nullptr;
#endif
}