I’d like this as a read-only property.
I always forget what resolution I upload my images at, and properties like SliceCenter and ImageRectSize/Offset rely on that information.
Support, but as quite a low priority feature to add. The thing is you can just open up your documents and get the resolution there. My friend PumpedRobloxian always sends me the pictures along with pictures of their dimensions.
Ergo…
You can’t open up your documents for other user images they want to display in your game on the go…
E.g: you have a house decorating system and allow users to use their own images for paintings. How can you make sure it’s not going to be stretched out without the image resolution/aspect ratio?
Oh right I see, yes I guess that is a problem. I still think it’s fairly low issue though
Well all the little things do add up.
And as @B_rcode pointed out,
So it would barely take any time for roblox to implement this feature - probably like 5 minutes (lol) - because they already have the data, all they need to do is create a read-only property to match.
It’s a perfectly reasonable thing to ask for, and yes we do of course have this information available. It could potentially affect multiple unrelated components though, like ImageLabel, ImageButton, Decal, Texture, MeshPart, etc. Anywhere a bitmap image is used as a source or texture. So maybe 6 minutes… (lol)
Does this mean it will be added? O.O
It will certainly be considered, but I was joking about the 6 minutes of course. While the numbers exist in memory, that’s not half the battle; it rarely is. Bitmap resources aren’t part of the Instance hierarchy, so it’s not a simple task of showing some properties, like it is for the absolute size of UI components. There is already the infrastructure to show properties of these objects that are reflected from C++ to Lua, which is why it’s easier to expose additional ones. It would be a considerably more work for the studio team to add an inspector for the properties of runtime-loaded assets (images, meshes, etc). Getting those numbers from C++ to Lua in a non-hacky way that supports other related requests (e.g. people have asked for triangle counts of meshes), thereby making it worth the effort, is something that has to be discussed and prioritized.
Any chance of this happening anytime soon?
I think this could become handy, the engineers could make it so automaticSize put the actual image dimensions.
Mix that with UIScale and you can resize it however you please
Bump, there’s already a property called ContentImageSize
but it’s behind the RobloxScriptSecurity level, making it only accessible by corescripts
It would be neat to make the variable available to developers, i don’t see why it could be an issue.
100%. This is an essential feature that should’ve been available to us a long time ago.
It certainly sounds less straight-forward than many people, including myself, initially considered. I hope you’re still considering it though, since I’m working on a script for PlayerGUI’s that lets me feed a function an array of images or a spritesheet, and some initialized values to essentially create particleEmitters and flipbooks for UI. The former input method works flawlessly, but the spritesheets depend on ImageRectSize and ImageRectOffset which takes the image’s resolution rather than the read-only AbsoluteSize or any other accessible values. I’ve been grasping at straws here looking for a way to find a way to automatically return the resolution of a decal but it’s been hopeless, so I’ve resorted to manually retrieving the resolution of decals which has had a negative impact on our workflow. By the time anything like this becomes accessible I’ll likely move on from this problem, but I still hope this feature gets added sooner than later.
Update: Ever since EditableImage has been created, now you can access the image resolution via EditableImage.Size
, assuming you load your images via AssetService:CreateEditableImageAsync("assetid")
Currently only available in studio, as this is still in beta.
Bump. Sucks knowing that this may be another essential feature that will take forever to add.
Another bump! Hoping this will be added soon!
Unfortunately this isn’t really possible for images that you don’t own now with the recent changes to permissions, which is a bummer since I have a plugin that uses EditableImages
to quickly get an asset’s information.
bro this really needs to get added. i know u can by making EditableImage and then getting it but that’s really not efficient, especially when you need to be able to do it for tons of images at once, like when a player searches images with :GetFreeDecals
From our side it would be great if these properties at least could get Plugin access to the resolution (and preferably file size).
We have created a plugin that displays all textures in a project in order to chase down unnecessary texture usages, this plugin used to display resolution, file size and estimated VRAM usage by letting an external service download the file and check it. This has been quite error prone since it rely on private Roblox API:s that tend to change.
Like many things which should be, there’s a years old thread (such as this one) with an agreeing reply from Roblox Staff that never went anywhere/did anything.