of     1   

mattchewy
#42591988Wednesday, February 16, 2011 2:09 AM GMT

I'm talking to dev on the DP chat thing right now and he said an image API would be really good idea. He told me to post my ideas and the devs would looks at it. Here is what I put; please review/change/add anything you think it needs. Thanks! Ok, I was thinking of an API where you could upload an image from the site and then be able to edit the image and use it in game! Here is some useful methods that could be in it: crop(posX, posY, sizeX, sizeY) -- Basically selects area to crop, or resize(in a way), an image resize(scaleX, scaleY) -- Resizes by scale, possible added as an extra form of crop function? rotate(angle) -- Rotates by a certain angle hue(r, g, b) -- Changes image hue amend(image, offsetX, offsetY) -- Adds image on to another at the offset positions; amended image gets added on-top of the called image addText(text, font, size, color) -- Adds text to image addShape(enum shape) -- List of predefined shapes(Rectangle, sphere, triangle) Code: local image = Image.new(“http://www.roblox.com/asset/?id=808080”) -- Load image from file image:crop(10, 10, 100, 100) -- Edits current image local new_image = Image.new(image) -- Clones an image, instead of editing it new_image:rotate(180) -- Flips image local new_image2 = Image.new(new_Image) new_image2:amend(image, 50, 50) -- Takes the first image userdata, and moves it to the position 50, 50 on the current image. script.Parent.ImageLabel.Image = new_image2
crazytomato4
#42592129Wednesday, February 16, 2011 2:11 AM GMT

There should be an X and Y position for addText and addShape.
blocco
#42592135Wednesday, February 16, 2011 2:11 AM GMT

Something for drawing any kind of polygon Something for drawing points Something for drawing lines
xSnowingSlayerx
#42592199Wednesday, February 16, 2011 2:12 AM GMT

Also, tell them to make the image GUIs not blurry. I don't want to face Blocco's painful math anymore.
blocco
#42592228Wednesday, February 16, 2011 2:12 AM GMT

@EmexSSx: trololol?
xSnowingSlayerx
#42592405Wednesday, February 16, 2011 2:15 AM GMT

Hey, it's the truth. :P
LPGhatguy
Forum Moderator
#42592504Wednesday, February 16, 2011 2:17 AM GMT

@Mattchewy Color.RGB(r, g, b) and Color.CYMK(c, y, m, k) would be nice instead of "hue", and then we could consolodate BrickColor and Color3, though keep those constructors...
[rfa#hidefromsearch]
#42592565Wednesday, February 16, 2011 2:18 AM GMT

[rfa#hidefromsearch]
ScripterJohn13
#42592928Wednesday, February 16, 2011 2:22 AM GMT

I'd like this alot especially if it worked with guis too.
blocco
#42594819Wednesday, February 16, 2011 2:49 AM GMT

@xSIXx: You're SIX, not SS
Samacado
#42595094Wednesday, February 16, 2011 2:52 AM GMT

Ask 'em to let me edit TextLabel text constraints (i.e, it'll just auto fit text within the box as best it can, and decrease text size if necessary), and to allow them to fit multiple lines of strings in one label. I could script it, but I really don't want to go through all these screen size possibilities.
XlegoX
#42600336Wednesday, February 16, 2011 5:50 AM GMT

An image is tricky design-wise though. If you make it a simple data it has to be atomic, however you obviously can't make it atomic. Changes would have to be made to the way basic data types are handled in order to have a non-atomic simple data type. If you make it an instance it has to replicate. How do you make it replicate? Do you send huge amounts of pixel data back and forth, and thus kill drawing performance, or allow longer latency and only pass the commands used to do the drawing, not the pixel changes? My current request is to provide a mechanism of sub-texture coordinates for AssetIDs which are images, since that's a really good feature cost-of-production vs benefits wise. Something like this: www.roblox.com/Asset/?id=2453453&texx=0.5&texy=0.5&texw=0.5&texh=0.5 I think an image API should be left alone for now until it can be done right.

    of     1