.:HyPeX:. Posted March 23, 2015 Share Posted March 23, 2015 Hello everyone, i just had an idea crossing my mind. Whenever you download an image, you can have it as a simple text string. Now, my question is, knowing how the .gif image is coded, couldnt some code decode it into images manually? (To fix the need to do it manually with the usefull function dxDrawGifImage) So far this is how an image is in a text string: I belive this is not possible to "decode" itself, but if we could just open it like hexeditor does.. Then decoding it and separating every image shouldnt be that hard. (Comparatively) Is it possible by any means in MTA? EDIT: It seems like it al relies on being able to go back and forth to the hex, this page seemed pretty easy: http://www.flexhex.com/docs/howtos/hex-editing.phtml Link to comment
ixjf Posted March 24, 2015 Share Posted March 24, 2015 It is possible, indeed, to read and parse the GIF file in-game. I wrote a parser for MTA long ago, but it is unfinished, and honestly, there's really no point in continuing it. But if you really want to do it, you'll need the specification for the GIF89a file format (http://www.w3.org/Graphics/GIF/spec-gif89a.txt). You'll also have to implement a compression algorithm needed to decode the image data, and then convert that data to a format that the MTA functions can read (which is, obviously, not covered by the specification - you'll have to figure that out on your own). Honestly, I wouldn't do it again. It's not worth it. And you too will eventually realize it's a waste of time. Link to comment
.:HyPeX:. Posted March 26, 2015 Author Share Posted March 26, 2015 It is possible, indeed, to read and parse the GIF file in-game. I wrote a parser for MTA long ago, but it is unfinished, and honestly, there's really no point in continuing it. But if you really want to do it, you'll need the specification for the GIF89a file format (http://www.w3.org/Graphics/GIF/spec-gif89a.txt). You'll also have to implement a compression algorithm needed to decode the image data, and then convert that data to a format that the MTA functions can read (which is, obviously, not covered by the specification - you'll have to figure that out on your own). Honestly, I wouldn't do it again. It's not worth it. And you too will eventually realize it's a waste of time. Okay, thanks! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now