Jump to content

encode image or model


Fist

Recommended Posts

Posted

hey!

Is it possible to encode image or model file so people couldn't steal it and when i would need to use it on server i could just decode it through code?

  • Moderators
Posted (edited)

You can use dxCreateTexture (the 2nd signature of it) to get a texture out of your variable containing your image data that you can then use with dxDraw functions like a classic image.

Make sure you don't loop the texture creation (I mean don't do that in an onClientRender for exemple) or you the client will eventually run out of memory.

Edited by Citizen
  • Like 1
Posted
2 hours ago, Citizen said:

You can use dxCreateTexture (the 2nd signature of it) to get a texture out of your variable containing your image data that you can then use with dxDraw functions like a classic image.

Make sure you don't loop the texture creation (I mean don't do that in an onClientRender for exemple) or you the client will eventually run out of memory.

Thank you! That's what i needed. :)

Posted

The wiki states that the engineLoadDFF function also accepts strings of text instead of a filepath.
So reading the file, then coding it and calling engineLoadDFF with that data would also work.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...