View Issue Details

IDProjectCategoryView StatusLast Update
0006155Multi Theft Auto : San AndreasClientpublic2015-03-28 23:13
ReporterDevan_LT Assigned Toccw  
Status resolvedResolutionfixed 
Fixed in Version1.3.1 
Summary0006155: Using 2D tables as image data

My suggestion is to make 2D tables work as filepath argument in DX drawing functions which use images. Then images could be more dynamic. Also, image formats which are not supported could be loaded into table with file functions and then displayed. That would also be useful for playing videos.

There's a workaround:
for y,row in ipairs(image)
for x,color in ipairs(row) do

It displays the image at the top left corner of the screen. But it's very slow.

TagsNo tags attached.



2011-06-04 11:52

viewer   ~~0013584

it's really bad idea


2011-06-04 19:33

viewer   ~~0013593



2011-06-05 00:07

viewer   ~~0013595

I don't have a lot of knowledge regarding DirectX, but I assume just like in OpenGL, you'd have to create a new texture and write it off pixel by pixel.

I suppose someone could make a createTextureFromTable, but please keep in mind we don't have THAT MUCH developers to work on a lot of things, Devan_LT. Frankly, I don't see much utility in this, and AFAIK you could create it with some work yourself using the client-side 1.1 fileWrite functions. Since PNG files are basically treated as textures or images.


2015-03-10 20:47

administrator   ~~0023085

This is a very bad idea.
A "better" solution would be to have an "ImageData" "element" that has functions like:
ImageData:setPixel( x, y, r, g, b, a )
ImageData:mapPixel( pixelFunction )
ImageData:getWidth( )
ImageData:getSize() (returns bytes)
ImageData:getString() (returns string that can be written to file)
ImageData:encode(file, outFormat) (outFormat is an enum: bmp, tga, png, jpg)


2015-03-28 23:11

administrator   ~~0023137

Last edited: 2015-03-28 23:12

Can be done using a string of pixel data with

Therefore fixed since

Issue History

Date Modified Username Field Change