Turn Roblox Frame into PNG

Is there any way to export a group of frames into a png? Are there any plugins, Scripts , or even built-in studio features that can help me achieve this?

3 Likes

Sorry, there is currently no one to download files from Roblox Player, or else it would be abused.

You can always screenshot to get a PNG of it

There is plenty of ways to download them.

1 Like

Do you mean a bunch of frames used as pixels to make up an image? Yeah, you can turn that into a bitmap and convert that however you want with the GIMP.

can you elaborate on that? how would I do that exactly?

I have considered this but was seeing if there was any way I could get it directly out of studio as SC drops the quality.

Fine then. Name a plugin, or write a script that makes a client download the current frame.

You use BitBuffer module (docs) so you can write numbers to a buffer with any given number of bits per number. That way, you can write the R, G and B values of each pixel to the buffer in the same layout that it’d be in a .data raw image file. BitBuffer lets you turn a buffer into a base64- coded string that you can copy/paste out of Studio into a text file to then manipulate with an external program and turn it into an actual .data file.

As an example, here’s a 4x4 image I created in the GIMP:

image

It can be exported to a .data image like this:

Looking at the raw data in a hex editor shows this:

**

**

Each letter or number in hex is 4 bits, so to get the 8 bits that each color is coded as we need two letters. The format is RRGGBBRRGGBBRRGGBB… and so on for each pixel. So the first pixel is red=FF=255 green=00=0 blue=03=3, or (255, 0, 3) which is exactly the color of the (mostly) red pixel in the 4x4 image I posted.

You need to know the R, G, B values of each pixel, and be able to read them in the right order (left to right, top to bottom). Here’s some example Lua code to get you started:

EDIT: :warning: apparently there’s a mistake, it should be dumpBase64 instead. See this reply

function frameGridToBase64Bitmap(frameGrid)
    local bitmapBuffer = BitBuffer()
    for _, frame in pairs(frameGrid:GetChildren()) do
        local color = frame.BackgroundColor3
        local R, G, B = color.R * 255, color.G * 255, color.B * 255
        bitmapBuffer.writeUInt8(R)
        bitmapBuffer.writeUInt8(G)
        bitmapBuffer.writeUInt8(B)
    end
    return bitmapBuffer.dumpString()
end

If you print the result of frameGridToBase64Bitmap you should get a string that you can easily copy/paste into a text editor. Now we need to turn that back into the original binary format, which we do by installing this Lua module and calling the following program with a local Lua installation:

local base64 = require("base64")
local inputString = [[/wAAAP8AAAD///8A]]
decoded = base64.decode( inputString )
local outputFile = io.open("outputFile.data", "wb")
outputFile:write(decoded)

This will overwrite any file caleld outputFile.data, just FYI. Put whatever your frameGridToBase64Bitmap printed into the inputString variable and call the program. You can now open the output image with the GIMP:

image

Hurray it works! Let me know if you’ve any questions :slight_smile:

3 Likes

thank you , i didnt know this was even possible

1 Like

Sorry for the bump. I am trying this now and am unable to do this because when printed to the output roblox turns the text into a bunch of unknown symbols like “���”. Tips?

EDIT: Use bitmapBuffer.dumpBase64() instead it works

2 Likes