Using Aspjpeg in C#.Net 3.5 app

Discussion in 'ASP.NET / ASP.NET Core' started by mm2000, Aug 15, 2008.

  1. Hi,

    Is it possible to use Persits Aspjpeg in C#.Net 3.5? If so, could you please reply with C# code that can use this component?

    I used the following code and when I try to load the page I got the error message 'Compiler Error Message: CS0246: The type or namespace name 'ASPJPEGLib' could not be found (are you missing a using directive or an assembly reference?)'.

    My Code:

    protected void Generate_From_Component()
    {

    string ImagePath = '../Images/test.jpg';

    ASPJPEGLib.IASPJpeg Jpeg = new ASPJPEGLib.ASPJpeg();

    ...........................
    }

    Thanks!!

    PS: I also tried adding the 'using ASPJPEGLib;' in code behind file at the top and got the namespace reference error message (same as above).

    Any help will be appreciated!!
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Since aspjpeg is a COM object, you'll need to use a InterOp. I have not tested it but it may work.


    You should really consider using ASP.NET component rather than accessing a COM object w/ .NET.


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Thanks for the reply Bruce. Few questions on that:

    // Since aspjpeg is a COM object, you'll need to use a InterOp. I have not tested it but it may work.

    I am not sure what you mean by 'InterOp'? Do you mean change <@Page aspcompat='true' %>. That did not seem to work either.


    // You should really consider using ASP.NET component rather than accessing a COM object w/ .NET.

    I would also prefer to use .Net component instead of COM object. Which one would you recommend (and is it offered by DASP)? I primarily want to resize uploaded images and found aspjpeg (offered by DASP) to be the best option.

    Any help (and maybe code) in using a .NET component to resize image would be greatly appreciated.

    Thanks a lot!! http://community.discountasp.net/emoticons/smile.gif
     
  4. Bruce

    Bruce DiscountASP.NET Staff

  5. Thanks for your help Bruce /emoticons/smile.gif
     

Share This Page