How do i convert CIF screenshot to something usable?!

Version 1
    This document was generated from CDN thread

    Created by: danielturner100 (simulated) on 10-03-2009 10:30:09 PM
    Hi Guys,
     
    I've been working on a remote control app to push xml to various phones on our network...
     
    its working awesomely for 7970s..
     
    im having some issues with 7960s and ip communicators...
     
    the CGI/Screenshot returns different stuff as im sure you're aware...
     
    the 60s return CIF file format which comes back in XML form looking like this...
     
    <CiscoIPPhoneImage><LocationX>-1</LocationX><LocationY>-1</LocationY><Height>100</Height><Width>160</Width><Depth>2</Depth><Data>FFFFFFFFFFFFFFFFFFFFFFFFFF and a load more Fs! and the closing XML bits..
     
    how do i get this into a format i can chuck in a text box in VB.net?
     
    I've tried for a while and now am trying to use the LoadCIPFromBuffer stuff in the Cisco SDK CIPImage Com objects but i'm having no luck with it.
     
    the IP Communicators seem to return only the cisco error = 0 thing and nothing else... i dont know if they support the CGI/Screenshot method anyway? the previous version crashed when you sent that to it!
     
    Please help! im really close to having something really useful for our engineers but 50% of our handsets are 60s so im a bit stuck!!!
     
    Thanks!

    Dan

    Subject: RE: How do i convert CIF screenshot to something usable?!
    Replied by: David Staudt on 11-03-2009 02:54:52 AM
    The CIP info is basically a custom graphic image format.  You are on the right track with LoadCIPFromBuffer().  The IP Phone Services SDK has an ASP sample called Screenshot that pretty much does what you describe.  Hopefully this works for you, otherwise let us know what your specific errors are.

    Subject: RE: How do i convert CIF screenshot to something usable?!
    Replied by: dan turner on 11-03-2009 11:22:42 AM
    Hi David
     
    Thanks a lot for your response... the screenshot asp file is EXACTLY what i need...
     
    unfortunately i cannot work out how to convert it from the file to vb...
     
    i dont know if you know any vb or if any other helpful soul does...
     
    i understand how this works as it is... but i'm having issues with getting the syntax right in VB
     
     var Inet1 = new ActiveXObject("CiscoURLProxy.URLGrabber");
     var cip = new ActiveXObject("CIPIMAGE.ImageProcessor.1");
     var rawdata = Inet1.GetURL("http://" + user + ":" + pass + "@" + phone + "/CGI/Screenshot", 0);
     cip.LoadCIPFromBuffer(rawdata);
     Response.ContentType = "image/gif";
     Response.AddHeader("Content-Disposition", "attached;filename=ScreenShot.gif;");
     Response.BinaryWrite(cip.SaveGIFToBuffer());
     }
     
    Dan

    Subject: RE: How do i convert CIF screenshot to something usable?!
    Replied by: dan turner on 13-03-2009 06:24:06 PM
     
    Hi Guys ,
    Can you perhaps offer some guidance as to where i'm going wrong with the script below...
    it crashes at the line "cip.loadCIPFromBuffer(BWScreenshot)"
     
     

    Dim BWScreenshot
    objSvrHTTP.open("Get", "http://" + IP + "/CGI/Screenshot", False, UserID, PIN)
    objSvrHTTP.send()
    BWScreenshot = objSvrHTTP.responseText
    Dim cip As New CIPIMAGE.ImageProcessor
    cip.LoadCIPFromBuffer(BWScreenshot)
    cip.SaveGIFToBuffer()
    PBSCREEN.Image = BWScreenshot