Welcome to MSDN Blogs Sign in | Join | Help

Photoshop texture importer?

Michael Klucher writes about a Paint.NET plugin for loading and saving Photoshop files. And this plugin includes C# source for parsing the .psd format. Hmm. I wonder how hard it would be to turn this into an XNA Framework texture importer, so you could add multi-layer .psd files directly to Visual Studio without having to flatten and export to some other format first?

Just throwing this out there on the off chance some enterprising reader might find the idea as interesting as I do :-)

Published Monday, May 18, 2009 11:39 AM by ShawnHargreaves

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Monday, May 18, 2009 3:50 PM by craaash

# re: Photoshop texture importer?

You could also use DevIL.NET to write a custom texture importer as shown at http://theinstructionlimit.com/?p=195

DevIL supports .psd as well as various other formats :-)

Tuesday, May 19, 2009 3:27 PM by CobaltHex

# re: Photoshop texture importer?

You should also add a .pdn one and a .xcf(gimp) and any other image editing format if you do that.

Thursday, May 21, 2009 6:24 PM by mpettineo

# re: Photoshop texture importer?

I managed to whip up an importer in about an hour or so...pretty easy to do if you don't want to support all of the crazy layer blending modes and whatnot.  

You could probably also do some other neat stuff like extracting specific layers or tiling the layers, but I think I'll leave that to someone who might have a use for a thing. :-D

Code's here, if anyone's interested:  http://members.gamedev.net/MJP/PSDImporter.zip

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker