Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Problem with Get Image !

Author
Message
Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 30th Mar 2010 18:02
get image 5000,0,0,1280,1024,1

and i recived error :

"Tried to read a surface which has no read permission"

Can help me ?
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 30th Mar 2010 18:19
Are you trying to get the image from bitmap 0?

Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 30th Mar 2010 18:28
Yes ... Same problem !
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 30th Mar 2010 18:34
Is the Get Image size bigger than the surface area, like your screen resolution is less than the size of the image your trying to get, cause you can't get an image greater than the screen (or current bitmap, not sure) resolution.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 30th Mar 2010 18:37
i the same when i write " get image 5000,100,100,200,200" ...
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 30th Mar 2010 18:48
Hmm... I believe I saw this problem in the bug report board, is you do a search for 'get image', you should be able to find it.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 30th Mar 2010 18:49
try this at the top:
set display mode 1280,1024,32




cheers.

I'm not a grumpy grandpa
Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 30th Mar 2010 18:54
same problem .... !!!!!!
Ashingda 27
18
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 30th Mar 2010 19:34
Show your codes?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th Mar 2010 23:12
I think this might be a problem with using a large image number (not just image size) try:
get image 5000,0,0,1280,1024,1

instead of:
get image 1,0,0,1280,1024,1

just as an experiment...

I would but I'm busy

luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 30th Mar 2010 23:48
Are you using lock pixels command in your code?This is what help files says:

Quote: "You cannot grab an image while the target pixels are being locked by the LOCK PIXELS command, as it is
not possible to read from a surface that is using the fast write only lock method on the pixels."


Where there is a will, there is a way.
I often edit my posts, that`s who i am
Jeff Miller
21
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 31st Mar 2010 15:33
Also, if you have turned anti-aliasing on by adding the fifth argument in the SET DISPLAY MODE command, then you will get this or a similar error if you attempt to get an image from the screen.
Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 31st Mar 2010 22:46
Solved ...

must have << DarksideDll >>

<< DarkDisplay.dll - V1.0 - Written By John Snowball
For Use With DarkBasic Pro Version 5.9 2006.
This Program Is 100% FreeWare, So Feel Free To
Use It In Any Way You Like!!!
To Contact Me Or For Info On Other DarkSide P.D Products
Then Visit My WebSite At
http://mysite.wanadoo-members.co.uk/darksidefreeware/index.html >>

Attachament Darkside.dll + DarkSideDisplay.ini



function SalvaImmagine(imma,x,y,x1,y1,file$)
ImmagineSchermo(imma)
if file exist(file$)=1 then delete file file$
x5001=x1-x
y5001=y1-y
create image imma+1,x5001,y5001
copy Image imma+1,imma,x,y,x1,y1
save image file$,imma+1
delete image imma:delete image imma+1
endfunction
rem =============================================

function ImmagineSchermo(imma)
DarkSide_Get_Display_ScreenShot
snapshot$=get clipboard$()
load image snapshot$,imma,1
delete file snapshot$
endfunction
rem =============================================
Guido Italy
20
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 31st Mar 2010 22:49
sorry ...
You must have also : << Image Kit >>

http://forum.thegamecreators.com/?m=forum_view&t=158832&b=8

Login to post a reply

Server time is: 2026-07-26 21:13:01
Your offset time is: 2026-07-26 21:13:01