Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Attention: The Community will be in read-only mode on 12/14/2017 from 12:00 am pacific to 11:30 am.

During this time you will only be able to see content. Other interactions such as posting, replying to questions, or marking content as helpful will be disabled for few hours.

We apologize for the inconvenience while we perform important updates to the Community.

New Member

CIPImage.DLL and ASP.NET

Hi there!

Does anyone have any experience working with the CIPImage.DLL in ASP.NET 2.0? I'm trying to convert and image, and it works... sorta. The issue is the image that is produced is a black box that is the size that I am expecting. I'm pulling what's left of my hair out here, hehe. Here is a really shoddy example of what I have.

Dim cipImage As New CIPIMAGE.ImageProcessor

cipImage.LoadJPG(AppDomain.CurrentDomain.BaseDirectory & "logo.gif")

Dim imgHeight As Integer = cipImage.height

Dim imgWidth As Integer = cipImage.width

Dim imgNewHeight As Integer = 65

Dim imgNewWidth As Integer = 133

cipImage.Resize(133, 33)

cipImage.RGBToPalette()

cipImage.ColorToGray()

cipImage.ReducePaletteColors(4)

Dim cipImageString As String = cipImage.SaveCIPDataToBuffer

Dim sbImage As New StringBuilder

sbImage.Append("<CiscoIPPhoneImage>")

sbImage.Append("<Title>QDI</Title>")

sbImage.Append("<Prompt>Test</Prompt>")

sbImage.Append("<LocationX>-1</LocationX>")

sbImage.Append("<LocationY>-1</LocationY>")

sbImage.Append(String.Concat("<Width>", 133, "</Width>"))

sbImage.Append(String.Concat("<Height>", 33, "</Height>"))

sbImage.Append("<Depth>2</Depth>")

sbImage.Append(String.Concat("<Data>", cipImageString, "</Data>"))

sbImage.Append("</CiscoIPPhoneImage>")

Return sbImage.ToString

262
Views
0
Helpful
0
Replies
CreatePlease to create content