Evan Wallace

  • Content count

  • Joined

  • Last visited

Community Reputation


About Evan Wallace

  1. BLP Converter Plugin

    Leif, he means creating a BLP plugin for photoshop. I don't have photoshop myself but if someone is willing to code a photoshop plugin and wants to work off my source code it can be found here. I've been meaning to post the source code it's just not completely done and tested yet. I should be able to get photoshop though, so I suppose I could try making one. Let me know if you can't find someone.
  2. BLP Converter Plugin

    I honestly have no idea if the plugin works with 64-bit windows or not, because no one I know has 64-bit windows so I can't test it. Those plugins you listed probably work because they were written in C#, but this plugin was written in C++ and so is probably strictly 32-bit. I may release a 64-bit version if I can get my hands on a 64-bit computer, but as of now this plugin is strictly 32-bit. Sorry for the inconvenience.
  3. BLP Converter Plugin

    Thank you very much. I forgot to implement transparency for version 2 BLPs. I updated it and it should work now!
  4. BLP Converter Plugin

    Update: Fixed saving problem with non-square images and 8-bit palette
  5. BLP Converter Plugin

    Ok, I linked to the 32-bit installer, but I don't know if a 32-bit plugin can be loaded from a 64-bit program. Can someone with 64-bit Windows verify that it works?
  6. BLP Converter Plugin

    No, they were just too big to post as zip files. But if you want I can post them as two 7-Zip files.
  7. filetype plugin not showing in open/save list

    Yeah I considered using the Microsoft Visual C++ 2008 Redistributable Package but I don't know if there is an uninstall option, and I like to know what I am doing to my system. If you ever want to stop using my plugin, all you have to do is delete it and the Microsoft.VC90.CRT folder instead of leaving those files who knows where on your HD. Personal preference I guess...
  8. filetype plugin not showing in open/save list

    I finally figured it out. Gahh that took forever! I did write a loader using the Paint.NET source code and I got the error: That led me here, which said that you have to: Copy everything on your computer from: C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT To here on the computer where it is not working: C:\Program Files\Paint.NET\FileTypes\Microsoft.VC90.CRT Finally works... looks like Visual C++ Express is not backwards-compatible, and Microsoft.VC90.CRT is installed in a IE7 update or something... anyway, thanks for your help!
  9. filetype plugin not showing in open/save list

    Reflector looks like a great tool, but all of the decompiled functions look identical. I have a hunch that it isn't strictly a problem with the assembly, because it loads fine on some computers... Apparently Paint.NET silently ignores loading errors in release builds: foreach (Type type in fileTypeFactories) { ConstructorInfo ci = type.GetConstructor(System.Type.EmptyTypes); IFileTypeFactory factory; try { factory = (IFileTypeFactory)ci.Invoke(null); } catch (Exception) { #if DEBUG throw; #else continue; #endif } FileType[] fileTypes; try { fileTypes = factory.GetFileTypeInstances(); } catch (Exception) { #if DEBUG throw; #else continue; #endif } if (fileTypes != null) { foreach (FileType fileType in fileTypes) { allFileTypes.Add(fileType); } } } So I guess I'll never know why...unless there is some way to get a debug version of Paint.NET
  10. BLP Converter Plugin

    It's not your fault... For some reason it works on my laptop and my brother's desktop but not my desktop. I have XP and my brother has Vista, so it's not that. I tried everything but I am looking into it. It only works sometimes and I have absolutely no idea why. Sorry it didn't work... Edit: I finally figured it out. Your computer does not have some files that are required by every program made with Visual C++ 2008. I have updated my original post with instructions on how to fix it.
  11. Ok, I know this is an odd request, but here it goes... I need to use C++, not C#, because I need to use a JPEG library in C. It is supposed to work because of Common Language Runtime. I have tried to create two identical code samples in both C# and C++, but the C# one works and the C++ one only works sometimes. It works on my laptop but not on my desktop, and both have the most recent version (3.35?). If you guys don't do C++ at all, just say so and I'll look elsewhere, but I just thought I'd try. Here is the C# version: using System; using System.IO; using PaintDotNet; using PaintDotNet.Data; using System.Collections.Generic; using System.Text; using System.Drawing; using System.Drawing.Imaging; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Resources; [assembly] [assembly] [assembly] [assembly] [assembly] [assembly] [assembly] [assembly] [assembly] [assembly] [assembly] [assembly] [assembly] namespace Test { public class TestFileType : FileType { public TestFileType() : base("Text Document", FileTypeFlags.SupportsLoading | FileTypeFlags.SupportsSaving, new String[] { ".txt" } ) { StreamWriter file = new StreamWriter(File.Open("C:\\test.log", FileMode.Append)); file.WriteLine("TestFileType::TestFileType() - C#"); file.Close(); } protected override Document OnLoad(Stream input) { StreamWriter file = new StreamWriter(File.Open("C:\\test.log", FileMode.Append)); file.WriteLine("TestFileType::OnLoad() - C#"); file.Close(); return new Document(100, 100); } protected override void OnSave(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback) { StreamWriter file = new StreamWriter(File.Open("C:\\test.log", FileMode.Append)); file.WriteLine("TestFileType::OnSave() - C#"); file.Close(); } }; public class TestFileTypeFactory : IFileTypeFactory { public FileType[] GetFileTypeInstances() { StreamWriter file = new StreamWriter(File.Open("C:\\test.log", FileMode.Append)); file.WriteLine("TestFileTypeFactory::GetFileTypeInstances() - C#"); file.Close(); return new FileType[] { new TestFileType() }; } }; } Here is the C++ version: using namespace System; using namespace System::IO; using namespace PaintDotNet; using namespace PaintDotNet::Data; using namespace System::Collections::Generic; using namespace System::Text; using namespace System::Drawing; using namespace System::Drawing::Imaging; using namespace System::Reflection; using namespace System::Runtime::CompilerServices; using namespace System::Runtime::InteropServices; using namespace System::Resources; [assembly]; [assembly]; [assembly]; [assembly]; [assembly]; [assembly]; [assembly]; [assembly]; [assembly]; [assembly]; [assembly]; [assembly]; [assembly]; namespace Test { public ref class TestFileType : FileType { public: static array^ extensions = gcnew array { ".txt" }; TestFileType() : FileType("Text Document", FileTypeFlags::SupportsLoading | FileTypeFlags::SupportsSaving, extensions ) { StreamWriter^ file = gcnew StreamWriter(File::Open("C:\\test.log", FileMode::Append)); file->WriteLine("FileType::TestFileType() - C++"); file->Close(); } protected: virtual Document^ OnLoad(Stream^ input) override { StreamWriter^ file = gcnew StreamWriter(File::Open("C:\\test.log", FileMode::Append)); file->WriteLine("FileType::OnLoad() - C++"); file->Close(); return gcnew Document(100, 100); } virtual void OnSave(Document^ input, Stream^ output, SaveConfigToken^ token, Surface^ scratchSurface, ProgressEventHandler^ callback) override { StreamWriter^ file = gcnew StreamWriter(File::Open("C:\\test.log", FileMode::Append)); file->WriteLine("FileType::OnSave() - C++"); file->Close(); } }; public ref class TestFileTypeFactory : IFileTypeFactory { public: virtual array^ GetFileTypeInstances() { StreamWriter^ file = gcnew StreamWriter(File::Open("C:\\test.log", FileMode::Append)); file->WriteLine("TestFileTypeFactory::GetFileTypeInstances() - C++"); file->Close(); return gcnew array { gcnew TestFileType() }; } }; } The code logs every function to C:\test.log. When I test both plugins, C:\test.log only contains: TestFileTypeFactory::GetFileTypeInstances() - C# TestFileType::TestFileType() - C# I was thinking that since TestFileTypeFactory::GetFileTypeInstances wasn't called, that: virtual array^ GetFileTypeInstances() isn't the right translation for: public FileType[] GetFileTypeInstances() or maybe there is an exception thrown in the Paint.NET source that is not reported, but I don't know. Any ideas?
  12. BLP Converter Plugin

    That's weird... You have the latest version? (3.3 I think) Here's how it looks on my screen, and I tested it on another computer... What does your screen look like?
  13. BLP Converter Plugin

    Just created a file type plugin for loading Blizzard Picture files (*.blp), which are used as textures in Warcraft III and WoW. If there are any BLPs that you can't load/save with this plugin, please post and attach them (and what they should be as a PNG or TGA or something if possible) and I'll work on supporting them too. Able to load: [*:d6qzs4s2]JPEG BLPs [*:d6qzs4s2]8-bit Palette BLPs [*:d6qzs4s2]DXT1/DXT3/DXT5 BLPs Able to save: [*:d6qzs4s2]JPEG BLPs [*:d6qzs4s2]8-bit Palette BLPs It was written in C++ and uses the libjpeg library. Automatic mipmap generation included. Updated 10/8/2008: [*:d6qzs4s2] Fixed opening problem with version 2 BLPs with transparency Updated 8/20/2008: [*:d6qzs4s2] Fixed saving problem with non-square images and 8-bit palette Note: If you do not see "Blizzard Picture (*.blp)" in the open/save box, your computer does not have the Microsoft Visual C++ 2008 SP1 Redistributable Package. Click here to download. blp.zip