bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) { LLPointer<LLImageRaw> raw = new LLImageRaw; S32 width = gViewerWindow->getWindowDisplayWidth(); S32 height = gViewerWindow->getWindowDisplayHeight(); F32 ratio = (F32)width / height; F32 supersample = 1.f; if (gSavedSettings.getBOOL("HighResSnapshot")) { #if 1//SHY_MOD // screenshot improvement const F32 mult = gSavedSettings.getF32("SHHighResSnapshotScale"); width *= mult; height *= mult; static const LLCachedControl<F32> super_sample_scale("SHHighResSnapshotSuperSample",1.f); supersample = super_sample_scale; #else //shy_mod width *= 2; height *= 2; #endif //ignore } if (gViewerWindow->rawSnapshot(raw, width, height, ratio, gSavedSettings.getBOOL("RenderUIInSnapshot"), FALSE, LLViewerWindow::SNAPSHOT_TYPE_COLOR, 6144, supersample)) { LLPointer<LLImageFormatted> formatted; switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))) { case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG: formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality")); break; case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: formatted = new LLImagePNG; break; case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP: formatted = new LLImageBMP; break; default: llwarns << "Unknown Local Snapshot format" << llendl; return true; } formatted->enableOverSize() ; formatted->encode(raw, 0); formatted->disableOverSize(); gViewerWindow->saveImageNumbered(formatted, -1); } return true; }
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) { LLPointer<LLImageRaw> raw = new LLImageRaw; S32 width = gViewerWindow->getWindowDisplayWidth(); S32 height = gViewerWindow->getWindowDisplayHeight(); if (gSavedSettings.getBOOL("HighResSnapshot")) { #if SHY_MOD // screenshot improvement const F32 mult = gSavedSettings.getF32("SHHighResSnapshotScale"); width *= mult; height *= mult; #else //shy_mod width *= 2; height *= 2; #endif //ignore } if (gViewerWindow->rawSnapshot(raw, width, height, TRUE, FALSE, gSavedSettings.getBOOL("RenderUIInSnapshot"), FALSE)) { gViewerWindow->playSnapshotAnimAndSound(); LLPointer<LLImageFormatted> formatted; switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))) { case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG: formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality")); break; case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: formatted = new LLImagePNG; break; case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP: formatted = new LLImageBMP; break; default: llwarns << "Unknown Local Snapshot format" << llendl; return true; } formatted->enableOverSize() ; formatted->encode(raw, 0); formatted->disableOverSize(); gViewerWindow->saveImageNumbered(formatted); } return true; }
bool handleEvent(const LLSD& userdata) { LLPointer<LLImageRaw> raw = new LLImageRaw; S32 width = gViewerWindow->getWindowWidthRaw(); S32 height = gViewerWindow->getWindowHeightRaw(); if (gSavedSettings.getBOOL("HighResSnapshot")) { width *= 2; height *= 2; } if (gViewerWindow->rawSnapshot(raw, width, height, TRUE, FALSE, gSavedSettings.getBOOL("RenderUIInSnapshot"), FALSE)) { gViewerWindow->playSnapshotAnimAndSound(); LLPointer<LLImageFormatted> formatted; switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))) { case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG: formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality")); break; case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: formatted = new LLImagePNG; break; case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP: formatted = new LLImageBMP; break; default: llwarns << "Unknown Local Snapshot format" << llendl; return true; } formatted->enableOverSize() ; formatted->encode(raw, 0); formatted->disableOverSize() ; gViewerWindow->saveImageNumbered(formatted); } return true; }