Commit 9535c4cc authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

added tiff to camvc

parent 14cd2d87
...@@ -565,6 +565,8 @@ Requests.prototype.parseXML=function(xml) { ...@@ -565,6 +565,8 @@ Requests.prototype.parseXML=function(xml) {
function getIfDefinedFCNV(obj) {return (typeof(obj)!="undefined")?((obj.firstChild)?obj.firstChild.nodeValue:""):"";} function getIfDefinedFCNV(obj) {return (typeof(obj)!="undefined")?((obj.firstChild)?obj.firstChild.nodeValue:""):"";}
function getIfDefined0FCNV(obj) {return (obj.length && (typeof(obj[0])!="undefined"))?((obj[0].firstChild)?obj[0].firstChild.nodeValue:""):"";} function getIfDefined0FCNV(obj) {return (obj.length && (typeof(obj[0])!="undefined"))?((obj[0].firstChild)?obj[0].firstChild.nodeValue:""):"";}
var veryFirstImage = true;
Requests.prototype.getImage=function() { Requests.prototype.getImage=function() {
// if (!document.imageEnabled) { requestsNextState(true); return; } // **** back to the main loop: SKIPPED // if (!document.imageEnabled) { requestsNextState(true); return; } // **** back to the main loop: SKIPPED
if (getBuTton('idEnableImageRefresh_CB').s==0) { requestsNextState(true); return; } /// **** back to the main loop: SKIPPED if (getBuTton('idEnableImageRefresh_CB').s==0) { requestsNextState(true); return; } /// **** back to the main loop: SKIPPED
...@@ -573,6 +575,14 @@ Requests.prototype.getImage=function() { ...@@ -573,6 +575,14 @@ Requests.prototype.getImage=function() {
/// document.requests.img++; debugComm(8192); /// document.requests.img++; debugComm(8192);
if (gPRoot["comp_run"].getValue() == 'run'){ if (gPRoot["comp_run"].getValue() == 'run'){
this.shadowImage.src= this.imgsrv+this.imgUrl+"&_time="+t.getTime(); this.shadowImage.src= this.imgsrv+this.imgUrl+"&_time="+t.getTime();
// for TIFF format there will be no onload event, need to fire it manually
if (gPRoot["color"].getValue()==15 && veryFirstImage){
var e = document.createEvent('HTMLEvents');
e.initEvent("load", false, true);
this.shadowImage.dispatchEvent(e);
//$(this.shadowImage).trigger("onload");
}
veryFirstImage = false;
// document.title+="bimg"; // document.title+="bimg";
} else if (this.ExifCircbufImgNeeded) { } else if (this.ExifCircbufImgNeeded) {
var newUrl=this.imgsrv+this.circbuf_fp+this.imgUrl; var newUrl=this.imgsrv+this.circbuf_fp+this.imgUrl;
......
...@@ -576,6 +576,9 @@ camInterface.prototype.gotHistogram=function() { ...@@ -576,6 +576,9 @@ camInterface.prototype.gotHistogram=function() {
var jp4obj; var jp4obj;
camInterface.prototype.gotShadow=function() { camInterface.prototype.gotShadow=function() {
console.log("Onload!");
// alert ("gotShadow: typeof(this)="+typeof(this)+"\ntypeof(gRequests)="+typeof(gRequests)); // alert ("gotShadow: typeof(this)="+typeof(this)+"\ntypeof(gRequests)="+typeof(gRequests));
if ((gPRoot["comp_run"].getValue() != 'run') && (gRequests.shadowImage.src.indexOf(gRequests.circbuf_fp)>=0)) { if ((gPRoot["comp_run"].getValue() != 'run') && (gRequests.shadowImage.src.indexOf(gRequests.circbuf_fp)>=0)) {
gRequests.ExifCircbufImgNeeded=false; gRequests.ExifCircbufImgNeeded=false;
...@@ -623,7 +626,7 @@ camInterface.prototype.gotShadow=function() { ...@@ -623,7 +626,7 @@ camInterface.prototype.gotShadow=function() {
jp4obj.data.resize(document.getElementById("idDivCameraImage").offsetWidth); jp4obj.data.resize(document.getElementById("idDivCameraImage").offsetWidth);
}else{ }else{
// this requires jquery // this requires jquery
jp4obj = $("#idCameraImage_div").jp4({ip:img_addr,port:img_port,width:document.getElementById("idDivCameraImage").offsetWidth,fast:true,lowres:1,note:true}); jp4obj = $("#idCameraImage_div").jp4({ip:img_addr,port:img_port,width:document.getElementById("idDivCameraImage").offsetWidth,fast:true,lowres:1,note:true});
} }
...@@ -659,7 +662,8 @@ camInterface.prototype.gotShadow=function() { ...@@ -659,7 +662,8 @@ camInterface.prototype.gotShadow=function() {
$($("#idCameraImage_div").find("#working")[0]).off("canvas_ready").on("canvas_ready",function(){ $($("#idCameraImage_div").find("#working")[0]).off("canvas_ready").on("canvas_ready",function(){
var newsrc = ($("#idCameraImage_div").find("#display")[0]).toDataURL(); var newsrc = ($("#idCameraImage_div").find("#display")[0]).toDataURL();
frAmeselSetImage ("idMagnifier_frAmesel", newsrc); frAmeselSetImage ("idMagnifier_frAmesel", newsrc);
frAmeselSetImage ("idWindow_frAmesel", newsrc); frAmeselSetImage ("idWindow_frAmesel", newsrc);
$(gRequests.shadowImage).trigger("load");
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment