<blocksapp="Snap! 5.0, http://snap.berkeley.edu"version="1"><block-definitions="show picture %'bitmap'"type="command"category="looks"><commentw="88"collapsed="false">display the given bitmap in a copy of the current costume (so you can switch back to the original costume again)</comment><header></header><code></code><translations></translations><inputs><inputtype="%l"></input></inputs><script><blocks="doSwitchToCostume"><blocks="reportNewCostumeStretched"><blockvar="bitmap"/><blocks="reportGetImageAttribute"><l><option>width</option></l><l><option>current</option></l></block><blocks="reportGetImageAttribute"><l><option>height</option></l><l><option>current</option></l></block></block></block></script></block-definition><block-definitions="$camera snap"type="reporter"category="sensing"><commentx="0"y="0"w="216"collapsed="false">takes a snapshot with the webcam and reports it as a new costume, or zero if the user cancels</comment><header></header><code></code><translations></translations><inputs></inputs><script><blocks="doDeclareVariables"><list><l>test</l><l>pic</l></list></block><blocks="doSetVar"><l>test</l><blocks="evaluate"><blocks="reportJSFunction"><list></list><l>var camDialog,
 result = false;

camDialog = new CamSnapshotDialogMorph(
 this.parentThatIsA(IDE_Morph),
 this,
 function () {result = null; },
 function (costume) {
 result = costume;
 this.close();
 }
);

camDialog.key = 'camera';
camDialog.popUp(this.world());
return function () {return result; };</l></block><list></list></block></block><blocks="doWaitUntil"><blocks="evaluate"><blocks="reifyScript"><script><blocks="doSetVar"><l>pic</l><blocks="evaluate"><blockvar="test"/><list></list></block></block><blocks="doReport"><blocks="reportNot"><blocks="reportEquals"><blockvar="pic"/><blocks="reportBoolean"><l><bool>false</bool></l></block></block></block></block></script><list></list></block><list></list></block></block><blocks="doReport"><blockvar="pic"/></block></script></block-definition></blocks>