How can I save a high res screenshot to a specific location?

#Entire ScreenShot Saving Code From Beta

You’ve seen this code of mine right?

https://forums.epicgames.com/threads/972861-TUTORIALS-C-for-UE4-gt-gt-New-VIDEO-Entire-Projectile-Class-Code-Accel-amp-Bounces?p=31676249&viewfull=1#post31676249

I am using custom viewport client to readpixels

Just thought I’d share this in case it will stimulate your progress in new direction.

The code above reads the viewport pixels directly and for me saves instantly without any delay.

To save the results to file you can use my binary save system wiki tutorial to write out the FColor Array to file.

In my beta tutorial above I am doing exactly that and can see the pictures in my OS

Rama

Hey guys,

I’m working on taking screenshots from within the code, and I need to be able to send them to a user-specified location.

I can do it using:

testSR.RequestScreenshot("File target location",false);

But it stops working if I set the GIsHighResScreenshot flag to true, then it saves it to the default directory (And it seems to be corrupted…)

Any idea how I get the HighResScreenshot to go to the right place? (And not be corrupted?)

Here’s my entire function by the way:

bool ASlateSearchHUD::SaveScreenshot(TArray<FString>& saveBoxOutput)
{
	saveBoxOutput.Empty();
	TArray<FString> selectedFiles;
	bool test = FDesktopPlatformModule::Get()->SaveFileDialog(GetDesktopWindow(), "Save a screenshot:", "C:\\", ".bmp", "Bitmap Image|.bmp", EFileDialogFlags::None, selectedFiles);
	
	FScreenshotRequest testSR = FScreenshotRequest();

	GIsHighResScreenshot = true;

	FVector2D sizeOut;

	GEngine->GameViewport->GetViewportSize(sizeOut);

	
	GScreenshotResolutionX = sizeOut.X;
	GScreenshotResolutionY = sizeOut.Y;

	

	testSR.RequestScreenshot(selectedFiles[0],false);
	test = testSR.IsScreenshotRequested();
	saveBoxOutput.Append(selectedFiles);
	return test;
	
}

Actually, I can’t see that link, since it goes to the old forums and for some reason my account won’t let me log in there anymore… have you put it on the wiki yet?

Hmmm, if I only comment out the GIsHighResScreenshot line it spits out a bigger image, but it’s only using GScreenshotResolutionX and making a large, square image, and it’s tiling it rather than actually being at a higher resolution.

This link is no longer there, even if you register on the old forum with a different email. Hey Rama, would love to see this, could you post a link to it…? Many thanks

Hey Rama, this tutorial seems like it would be very helpful for something I’m working on now, but as others have said, the forums you’re linking to are not accessible. Could you please post it on the new forums (or wiki, anywhere) so we can see it?

Is there any chance you could please post this tutorial elsewhere? That link is private and inaccessible. Other users are saying the same thing. This is exactly the kind of information that I’ve been looking for.

please update your link url