Okay, so in looking at the scripting, whether it's through Huddell's screenshot saver, or Mapshot, there's a few things that are glaring at me.
What if, persay, I didn't want a screenshot of the entire map, or even the whole screen, but instead just a x1,y1,x2,y2 area? Any plugins that do that already? or any script ideas that could do that?
EDIT - Update....
While I'm still an idiot sometimes, and not sure how I could do this, here's what I do know.
I know that taking a screenshot or a mapshot, usually still renders the entirety of the canvas, and that in order to get a cropped image, you have to use some sort of bridge to a NEW canvas, per
So, anyone have ANY kind of uber-smart goo that can help this guy with his dilemna?
What if, persay, I didn't want a screenshot of the entire map, or even the whole screen, but instead just a x1,y1,x2,y2 area? Any plugins that do that already? or any script ideas that could do that?
EDIT - Update....
While I'm still an idiot sometimes, and not sure how I could do this, here's what I do know.
I know that taking a screenshot or a mapshot, usually still renders the entirety of the canvas, and that in order to get a cropped image, you have to use some sort of bridge to a NEW canvas, per
Code:
var img=new Image();
img.crossOrigin='anonymous';
img.onload=start;
img.src="https://i.stack.imgur.com/EUBBt.png";
function start(){
var croppedURL=cropPlusExport(img,190,127,93,125);
var cropImg=new Image();
cropImg.src=croppedURL;
document.body.appendChild(cropImg);
}
function cropPlusExport(img,cropX,cropY,cropWidth,cropHeight){
// create a temporary canvas sized to the cropped size
var canvas1=document.createElement('canvas');
var ctx1=canvas1.getContext('2d');
canvas1.width=cropWidth;
canvas1.height=cropHeight;
// use the extended from of drawImage to draw the
// cropped area to the temp canvas
ctx1.drawImage(img,cropX,cropY,cropWidth,cropHeight,0,0,cropWidth,cropHeight);
// return the .toDataURL of the temp canvas
return(canvas1.toDataURL());
}
So, anyone have ANY kind of uber-smart goo that can help this guy with his dilemna?