-
Dec 14th, 2011, 02:43 PM
#1
Thread Starter
Hyperactive Member
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.
-
Dec 15th, 2011, 02:25 PM
#2
Thread Starter
Hyperactive Member
Re: VB.NET 2010 How Do I Save As .TGA Format
Bump
please some help with this..
-
Dec 15th, 2011, 02:59 PM
#3
Re: VB.NET 2010 How Do I Save As .TGA Format
What is the error and associated error details?
-
Dec 15th, 2011, 03:12 PM
#4
Thread Starter
Hyperactive Member
Re: VB.NET 2010 How Do I Save As .TGA Format
Originally Posted by ForumAccount
What is the error and associated error details?
Error 1 Expression does not produce a value.
that's all the error message tells me.
-
Dec 15th, 2011, 05:56 PM
#5
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)
-
Dec 16th, 2011, 01:04 AM
#6
Thread Starter
Hyperactive Member
Re: VB.NET 2010 How Do I Save As .TGA Format
Originally Posted by MattP
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.
-
Dec 16th, 2011, 10:04 AM
#7
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.
-
Dec 16th, 2011, 03:20 PM
#8
Thread Starter
Hyperactive Member
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..
-
Dec 18th, 2011, 10:44 PM
#9
Thread Starter
Hyperactive Member
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.
-
Dec 19th, 2011, 10:13 AM
#10
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.
-
Dec 19th, 2011, 01:40 PM
#11
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|