Trouble compressing DXT5 texture on Linux

I’ve build Monogame from source (5260f82170c9a523de44b4638db9b329b1cbdd87) to follow these tutorials:

http://rbwhitaker.wikidot.com/monogame-texture-atlases-1

I’m trying to import the provided SmileyWalk.png image as a DXT5 compressed texture, but I get an exception and a stack trace when trying to do so.


Build started 10/15/2015 9:43:09 PM

Cleaning /home/jed/build/MonoGame/TestTextureAtlas/Content/bin/Windows/SmileyWalk.xnb
/home/jed/build/MonoGame/TestTextureAtlas/Content/SmileyWalk.png
Doing a copy between bitmaps
Could not compress texture System.InvalidOperationException: Could not copy between Color and Dxt5
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.BitmapContent.Copy (Microsoft.Xna.Framework.Content.Pipeline.Graphics.BitmapContent sourceBitmap, Rectangle sourceRegion, Microsoft.Xna.Framework.Content.Pipeline.Graphics.BitmapContent destinationBitmap, Rectangle destinationRegion) [0x00000] in :0
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.BitmapContent.Copy (Microsoft.Xna.Framework.Content.Pipeline.Graphics.BitmapContent sourceBitmap, Microsoft.Xna.Framework.Content.Pipeline.Graphics.BitmapContent destinationBitmap) [0x00000] in :0
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.TextureContent.ConvertBitmapType (System.Type newBitmapType) [0x00000] in :0
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.GraphicsUtil.Compress (System.Type targetType, Microsoft.Xna.Framework.Content.Pipeline.Graphics.TextureContent content, Boolean generateMipMaps) [0x00000] in :0
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.GraphicsUtil.CompressDxt (GraphicsProfile profile, Microsoft.Xna.Framework.Content.Pipeline.Graphics.TextureContent content, Boolean generateMipMaps, Boolean premultipliedAlpha, Boolean sharpAlpha) [0x00000] in :0
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.GraphicsUtil.CompressTexture (GraphicsProfile profile, Microsoft.Xna.Framework.Content.Pipeline.Graphics.TextureContent content, TextureProcessorOutputFormat format, Microsoft.Xna.Framework.Content.Pipeline.ContentProcessorContext context, Boolean generateMipmaps, Boolean premultipliedAlpha, Boolean sharpAlpha) [0x00000] in :0
at Microsoft.Xna.Framework.Content.Pipeline.Processors.TextureProcessor.Process (Microsoft.Xna.Framework.Content.Pipeline.Graphics.TextureContent input, Microsoft.Xna.Framework.Content.Pipeline.ContentProcessorContext context) [0x00000] in :0

Build 1 succeeded, 0 failed.

Time elapsed 00:00:00.21.


I tried to get the debugger to break on a breakpoint at line 100 of Microsoft.Xna.Framework.Content.Pipeline.Graphics.BitmapContent as my grep shows that that’s the only place where that particular error string would show up, but no dice. Probably I’ve got something set up wrong where Monodevelop doesn’t want to debug a dll external to the Pipeline.Linux project. Right now I can work around the problem by setting the image to be uncompressed, but I’d like to be able to DXT compress stuff for my real games, so has anyone got any sage advice or ideas about what’s going wrong here?

I’m working through some issues with calling the FreeImage native code functions at the moment. This manifests itself on Mac and Linux. Not quite sure what is going on yet.

Please let me know if there’s anything I can do to help you out.