View Issue Details

IDProjectCategoryView StatusLast Update
0006722New issuesClientpublic2014-11-09 20:33
ReporterKernellAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Summary0006722: Make function for drawing images from BLOB field
Description

I have a BLOB field in my MySQL server. I want display this image after mysql query.

TagsNo tags attached.

Activities

arranTuna

2011-12-14 14:37

manager   ~~0015374

Isn't this possible with the client side file functions?

Put the data into the file then load it with dxDrawImage.

Kernell

2011-12-14 14:47

reporter   ~~0015375

You do not understand.

Example:

--- server:

result = db:query( "SELECT image FROM blablabla WHERE id = 123" );

image = result:fetch_assoc();

triggerClientEvent( player, 'transfer_image', player, image );

--- client:

addEventHandler( 'transfer_image', root,
function( image )
render_img = dxCreateTexture( image ); -- or new function for convert from blob data to element
end
);

addEventHandler( 'onClientRender', root,
function()
dxDrawImage( 123, 456, 64, 64, render_img );
end
);

arranTuna

2011-12-14 14:49

manager   ~~0015376

When the image is received by the client you can store it in a file with file functions and once its stored load the image?

Kernell

2011-12-14 14:55

reporter   ~~0015377

It uses more resources and my example is more convenient.

MX_Master

2011-12-15 18:58

viewer   ~~0015381

arranTuna
Is file, saved to client's folder while resource is running, can be loaded by dxCreateTexture? I know that only files from meta.xml can be loaded by dx functions..

arranTuna

2014-11-09 20:33

manager   ~~0022300

dxCreateTexture accepts pixels.

Issue History

Date Modified Username Field Change