Results 1 to 11 of 11

Thread: VB.NET 2010 How Do I Save As .TGA Format

  1. #1

    Thread Starter
    Hyperactive Member Vexslasher's Avatar
    Join Date
    Feb 2010
    Posts
    429

    Unhappy VB.NET 2010 How Do I Save As .TGA Format

    OK I have been trying to find a way of saving images in .TGA format I know it's not supported directly so I have been doing some searching and found this http://www.mastropaolo.com/devildotnet/ I added the reference and checked to use the name or whatever under that for the Devil dll and I added both the DevIL.NET.dll and the DevIL.NET2.dll files to the references and then I even tried putting imports.DevIL at the top of my code but it still wouldn't work I fallowed the examples from the site and it gives me an error under the word DevIL and is says something like namespace is invalid or something like that

    Code:
    Dim bmp as System.Drawing.Bitmap
    bmp = pictureBox1.Image
    DevIL.DevIL.SaveBitmap(filename)
    that highlighted area is where I'm getting the error, this is how that site shows to save it however I'm not sure how it would know if it was a tga or not with that..

    Thank you for your time I hope you can help me out with this, also I haven't used references in the past so it might be something small that I just don't know.
    Last edited by Vexslasher; Apr 2nd, 2012 at 02:46 AM.

  2. #2

    Thread Starter
    Hyperactive Member Vexslasher's Avatar
    Join Date
    Feb 2010
    Posts
    429

    Re: VB.NET 2010 How Do I Save As .TGA Format

    Bump

    please some help with this..

  3. #3
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: VB.NET 2010 How Do I Save As .TGA Format

    What is the error and associated error details?

  4. #4

    Thread Starter
    Hyperactive Member Vexslasher's Avatar
    Join Date
    Feb 2010
    Posts
    429

    Re: VB.NET 2010 How Do I Save As .TGA Format

    Quote Originally Posted by ForumAccount View Post
    What is the error and associated error details?
    Error 1 Expression does not produce a value.

    that's all the error message tells me.

  5. #5
    Frenzied Member MattP's Avatar
    Join Date
    Dec 2008
    Location
    WY
    Posts
    1,227

    Re: VB.NET 2010 How Do I Save As .TGA Format

    The C# and VB.NET examples are different for that section.

    Try changing it to provide the bmp:

    Code:
    DevIL.DevIL.SaveBitmap(filename, bmp)

  6. #6

    Thread Starter
    Hyperactive Member Vexslasher's Avatar
    Join Date
    Feb 2010
    Posts
    429

    Re: VB.NET 2010 How Do I Save As .TGA Format

    Quote Originally Posted by MattP View Post
    The C# and VB.NET examples are different for that section.

    Try changing it to provide the bmp:

    Code:
    DevIL.DevIL.SaveBitmap(filename, bmp)
    This is giving me the same exact error I was already having..

    Error 1 Expression does not produce a value.

  7. #7
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: VB.NET 2010 How Do I Save As .TGA Format

    From the information you've provided the only thing I can tell you is that whatever "DevIL" is, it doesn't return a value, i.e., a class that has an additional "DevIL" member or an object at all. It's would be the same as doing something like this:
    Code:
    Public Sub DevIL()
    
    End Sub
    
    Public Sub SomeMethod()
        DevIL.GetSomething()
    End Sub
    Obviously the above won't work because the DevIL method doesn't return anything.

  8. #8

    Thread Starter
    Hyperactive Member Vexslasher's Avatar
    Join Date
    Feb 2010
    Posts
    429

    Re: VB.NET 2010 How Do I Save As .TGA Format

    OK I found out that my actual error is this..

    Error 1 'DevIL' is ambiguous in the namespace 'DevIL'.

    the other error was coming up after I had tried the suggested fix that it provided. but it wasn't a fix at all..

  9. #9

    Thread Starter
    Hyperactive Member Vexslasher's Avatar
    Join Date
    Feb 2010
    Posts
    429

    Re: VB.NET 2010 How Do I Save As .TGA Format

    Bump.. I still need help with this anyone know any methods for saving images as tga please.

  10. #10
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: VB.NET 2010 How Do I Save As .TGA Format

    The issue isn't saving images as .tga, the issue is resolving where exactly the method/class you are trying to access is. Have you seen this? You need to fully qualify the name of the method you are trying to use. Try using the object browser to find the method, or try just using intellisense. Members that are accessible will show up in that list.

  11. #11

    Thread Starter
    Hyperactive Member Vexslasher's Avatar
    Join Date
    Feb 2010
    Posts
    429

    Re: VB.NET 2010 How Do I Save As .TGA Format

    Thank you ForumAccount that made me understand my mistake. As it says on that link you gave me "ambiguous and therefore conflicts with another name." this was caused because I had 2 .dll files that must have both being trying to provide what I was wanting at the same time counteracting each other in turn returning my error. thanx again wouldn't figured this out with out you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width