SRL Archive - Help and Support

Getting bitmaps from a site


Gu3st...

2008-08-30 08:21:53

I want to get a picture from a site and turn it into a bitmap to use in my script.
lets take this as an example:
http://itemdb-rs.runescape.com/2372_obj_big.gif?id=440

I remember I did something like this with markus, so this post is almost mainly to him.

EDIT: I mean to make a script that do it for me.

Shuttleu

2008-08-30 08:52:36

right click on it then choose save image as
then open up scar and go to tools and choose picture to string
then choose the image you downloaded and press ok

oh and make sure that the image is a bitmap ;)

i think thats what you mean anyway

~shut

Gu3st...

2008-08-30 08:57:29

From: Shuttleu
right click on it then choose save image as
then open up scar and go to tools and choose picture to string
then choose the image you downloaded and press ok

oh and make sure that the image is a bitmap ;)

i think thats what you mean anyway

~shut


Ofc i know that :p

I meant making a script that would do it for me.

Naum

2008-08-30 09:46:41

Use a canvas to copy that pic then trim it and use it as a bitmap :).
Check Yakmans tutorial on Canvases :)

Gu3st...

2008-08-30 09:50:27

From: NaumanAkhlaQ
Use a canvas to copy that pic then trim it and use it as a bitmap :).
Check Yakmans tutorial on Canvases :)


Yeah, thats a way to do it, but i dont want to see the picture i want to use.

Markus and I managed to make a script to save pictures, now i just dont remember how…

EDIT: Wait.. its possible to do this without viewing the picture?

Markus

2008-08-30 10:12:11

writefilestring (getpage
or something like that

Gu3st...

2008-08-30 10:14:47

From: Markus
writefilestring (getpage
or something like that


You dont got the script anymore?
not even the one for looking up those items (or something) that you didnt finish cause freddy didnt add the 'thing'? (i cant remember)

Edit1: I cant say that helped me alot..
function WriteFileString(FileNum: Integer; s:string): Boolean;

Naum

2008-08-30 10:23:38

Canvas -> GetBitmapCanvas :)

Gu3st...

2008-08-30 10:26:29

From: NaumanAkhlaQ
Canvas -> GetBitmapCanvas :)


Cant say that helped alot either :D

Nava2

2008-08-30 12:04:19

Modify this! :)

if not FileExists(AppPath + 'includes\SRL\Nava2 Scripts\FireCrafterBack.bmp') then
begin
CloseFile(RewriteFile(AppPath+'includes\SRL\Nava2 Scripts\FireCrafterBack.bmp',False));
if FileExists(AppPath+'includes\SRL\nava2 scripts\FireCrafterBack.bmp') then
begin
i := RewriteFile(AppPath+'includes\SRL\Nava2 Scripts\FireCrafterBack.bmp',False);
s := GetPage('http://www.geocities.com/nava2@ymail.com/firecrafterback.bmp');
if WriteFileString(i,s) and (length(s) > 50) then
Writeln('File written successfully');
CloseFile(i);
end else
begin
Writeln('Could not download form image, exiting.');
TerminateScript;
end;
end;

Gu3st...

2008-08-30 12:30:49

Tanks! Finally someone who knows it!!

I think that was almost just like me and markus did it :)

Nava2

2008-08-31 10:49:43

My pleasure.