osg::Image* createImage3DWithAlpha(const ImageList& imageList, int s_maximumImageSize, int t_maximumImageSize, int r_maximumImageSize, bool resizeToPowerOfTwo) { GLenum desiredPixelFormat = 0; bool modulateAlphaByLuminance = false; unsigned int maxNumComponents = maximimNumOfComponents(imageList); if (maxNumComponents==3) { desiredPixelFormat = GL_RGBA; modulateAlphaByLuminance = true; } osg::ref_ptr<osg::Image> image = createImage3D(imageList, desiredPixelFormat, s_maximumImageSize, t_maximumImageSize, r_maximumImageSize, resizeToPowerOfTwo); if (image.valid()) { if (modulateAlphaByLuminance) { modifyImage(image.get(), ModulateAlphaByLuminanceOperator()); } return image.release(); } else { return 0; } }
bool clearImageToColor(osg::Image* image, const osg::Vec4& colour) { if (!image) return false; modifyImage(image, SetToColourOperator(colour)); return true; }
void PhotoDetails::slotAccept() { modifyImage(); }
void PhotoDetails::slotNextProp() { modifyImage(); emit nextImage(); }
void PhotoDetails::slotPrevProp() { modifyImage(); emit prevImage(); }