[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
RabidHaMsTeR.Org • View topic - R2e Uploading Images ?

R2e Uploading Images ?

Information on customizing R2/Extreme

Moderators: rabidhamster, Rovastar

R2e Uploading Images ?

Postby JTechnical » Thu Dec 04, 2003 5:36 pm

Just a question about R2's ability to accept images over the telnet backend ?

Can it ?

Im in the process of making an app (which ill make availible to u all)

I just cant find any info on R2's ability to accept files >??

Cheers Gordon, Uve been really handy over email just thought id bring this one to the forum ;)



Heres Some Screenshots of what to expect:

Login which just requires the Server IP & they Key/Password
Image

The main control screen, theres different sections most are finished, im gonna release a lite & a pro. Both will have the same features just that pro will be oriented toward the automated area, where they need to be left to do a job for an evening etc .....
Image
JTechnical
 
Posts: 19
Joined: Mon Dec 01, 2003 11:45 pm

Postby rabidhamster » Sat Dec 06, 2003 2:52 pm

hi. sorry for not replying sooner - i never seem to get notification of new posts. Yep, R2e can - i can find you some information on it. As far as i can remember, you have to send one line at a time, and encode it as hexadecimal.

Ok - since i never document ANYTHING i've had to try and figure this out from the code, so...

call TEXSIZE(texturenum,width,height)
both width and height must be 32,64,128,256,512 etc.

call TEXLINE(texturenum,offset,data)
texturenum = the number of the custom txeture to load into
offset = offset in pixels that this data is at (x+(y*width))
data = data encoded as 4-byte RGBA hexadecimal (eg. AABBGGRR) if that makes sense. it may be AARRGGBB but you'll soon find out :p

you'll want to do this once per line or so - sending one long one may slow R2e down or screw it up :)

then finally send, TEXLOAD(texturenum)

so as an example:
TEXSIZE(1,2,2);
TEXLINE(1,0,[FF000000FFFFFFFFFF000000FFFFFFFF]);
TEXLOAD(1);

and that'll load a 2x2 image into R2e - it comes out as a giant blur - just tried it. Anyway, hope you get the idea.

Cheers for working on stuff for R2e :)
rabidhamster
Site Admin
 
Posts: 1100
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England

Postby rabidhamster » Sat Dec 06, 2003 2:57 pm

btw. forgot to say - it looks cool.
Keep up the good work - i look forward to seeing it.

You may find that a library like OpenIL (http://openil.sourceforge.net/) will handle image loading nicely for you. Its what R4 uses and it seems pretty quick and stable - plus you can do some nice image effects and then get right at the binary data in the right form to send to R2e.

Infact you can even extract one line at a time in RGBA format into a buffer, which would do you nicely.

- Gordon
rabidhamster
Site Admin
 
Posts: 1100
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England

Postby JTechnical » Sat Dec 06, 2003 11:08 pm

Nice 1 ill have a tinker right away.

Ive done the messaging & the winamp controller :) Jus branding & advertising which requires much image uploading so let the fun begin ;)
JTechnical
 
Posts: 19
Joined: Mon Dec 01, 2003 11:45 pm

Postby JTechnical » Tue Dec 09, 2003 7:25 pm

Fearing loking like an idiot here but the problems i face are:

writing the Txt file to the Telnet server line by line.

I need to write the line as:


TEXSIZE(1,2,2);
TEXLINE(1,0,[texture.txt]);
TEXLOAD(1);

But only need to send one line at a time then send TEXLOAD(1); then line 2 then TEXLOAD(1); again then line 3 etc ... cant think of a way to do that using my small untrained mind.....
JTechnical
 
Posts: 19
Joined: Mon Dec 01, 2003 11:45 pm

Postby rabidhamster » Wed Dec 10, 2003 8:56 am

rabidhamster
Site Admin
 
Posts: 1100
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England

Postby JTechnical » Wed Dec 10, 2003 6:24 pm

JTechnical
 
Posts: 19
Joined: Mon Dec 01, 2003 11:45 pm


Return to R2/Extreme customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron