locked
Name 'Generator' not declared RRS feed

  • Question

  • User1847508480 posted
    Hello I got this piece of image quantization code off of the MSDN website and I run it through a C# to VB.net convertor and I got the following code, but when I try to compile it I get the above error on the first line. I also get an error on the line that says ' Dim quantizer As New OctreeQuantizer(255, 8)'. Does anyone know why? Public Sub RenderImage() Dim image As Bitmap = Generator.GenerateImage("Octree Quantized") Try Dim quantizer As New OctreeQuantizer(255, 8) Dim quantized As Bitmap = quantizer.Quantize(image) Try Response.ContentType = "image/gif" quantized.Save(Response.OutputStream, ImageFormat.Gif) Finally quantized.Dispose() End Try Finally image.Dispose() End Try End Sub 'RenderImage
    Tuesday, March 2, 2004 4:04 AM

All replies

  • User-46888941 posted
    Do you import the namespace which has the Generator?
    Wednesday, March 3, 2004 11:05 AM