Posts: 367
Threads: 55
Joined: Oct 2011
Reputation:
0
any one? I may need to use fread for this thing, but I don't know how.
Posts: 1,923
Threads: 46
Joined: Aug 2012
Reputation:
0
You can't use image files in SA:MP.
Posts: 367
Threads: 55
Joined: Oct 2011
Reputation:
0
I'm not talking about sa-mp, I'm talking about reading image's pixel's color in pawn. It doesn't matter, pawn or c++(without any libraries), they all have function to read file, like fread in pawn.
Let's say I have image file and I want to get pixel's which is at x=50, y=60(coords doesn't matter, it's just a example) color. Only get that pixel's color in variable, nothing else. Reading methods may be different in different image formats, but one example would be enough for me.
Posts: 734
Threads: 8
Joined: Jun 2009
I don't know if such library/include you're looking for exists for PAWN, anywhere...
But here's something ****** made back in '12, though it was for writing a simple BMP image,
but I guess you can reverse it for reading as well:
http://pastebin.com/8A2kC10D
Though I'm not sure why would you want to go through all that much of effort when you can
simply define colours, etc.. and there are already image2textdraw converters...
Posts: 367
Threads: 55
Joined: Oct 2011
Reputation:
0
10.02.2013, 15:42
(
Последний раз редактировалось zgintasz; 10.02.2013 в 16:17.
)
Thanks, but I'm not searching for library/include(like you said in first sentence). It's a great example for writing, but I'm not sure if I can easily reverse it for reading...
Posts: 367
Threads: 55
Joined: Oct 2011
Reputation:
0
I found on some websites, that bmp file reading is the easiest. Can someone make an example of reading it like I said above?
Posts: 367
Threads: 55
Joined: Oct 2011
Reputation:
0
I have checked almost all examples, they all are using classes and additional libraries, I don't know how to convert that code to pawn.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Why would you even need this?