Saving a patch of screen
BlitzPlus Forums/BlitzPlus Programming/Saving a patch of screen
| ||
Hi, Good People :-) I am trying to write a picture gallery, using BlitzPlus. I need to quote a square patch from the middle of a picture to use as a link to the full-size picture. The full size is 800px wide and the square patch is to be 200px wide. Assuming the full picture is loaded at the top-left of the screen, the patch would be: top-left: 300x200 bottom-right: 500x400 What command would save that bit of screen? Thank you for any help you can offer :-) Julian (-_-) |
| ||
GrabImage - see docs |
| ||
Thank you Snarkbait Going to try it now :-) |
| ||
I have spent hours trying to make this work. It should display a picture and save a quote from it. It keeps halting DrawImage(pic, 0, 0) saying that pic is invalid. What am I doing wrong? xres=GadgetWidth(Desktop()) yres=GadgetHeight(Desktop()) Graphics xres, yres SetBuffer FrontBuffer() sorc$=CurrentDir$()+"big" dest$=CurrentDir$()+"small" grab=CreateImage(200,200) pic=0 csd=sorc$ Repeat file$=NextFile$(csd) If Len(file$)>4 pic=LoadImage(file$) Cls DrawImage(pic, 0, 0) Delay 100 tmp$=Left(file$,Len(file$)-4) GrabImage grab,300,200 ok=SaveBuffer(FrontBuffer(),dest$+tmp$+".bmp") FreeImage(pic) EndIf Until file$="" Notify "DONE" End |
| ||
You must not be referencing the filename properly looks like it should be csd = ReadDir(sorc$) |
| ||
Yes, with your current assignmentcsd=sorc$ csd is an integer variable, so its value becomes 0 |