BP Forums
Help with PCX file. - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+---- Thread: Help with PCX file. (/showthread.php?tid=834)



Help with PCX file. - Worf - 09-23-2014

Hi.

I'm in real need of being able to display .PCX graphic files in my app. I am using Visual Studio 2013 .NET.

I've tried GDPicturedotnet but for some reason it is not showing up in the Toolbox and when I select 'Show all' it is greyed out. I've also tried IocompDotNet V4 SP3 but unable to find any help files or documents on how to use their commands.

Many, Many thanks for your help.


Re: Help with PCX file. - brandonio21 - 09-23-2014

Unfortunately, I have never dealt with .PCX graphics before. After doing some Googling, I was able to come across the following thread:

http://bytes.com/topic/c-sharp/answers/790554-how-load-pcx-images-into-system-drawing-bitmap

You probably don't want to read it, so in the thread they mention that the .NET framework does not support loading .PCX images by default (Which you've already discovered). The recommended library is dotnetfireball, which can be found here: http://dotnetfireball.codeplex.com/.

Here is a code snippet presented on the linked forum thread that uses dotnetfireball to load a *.pcx

[code2=vbnet]Dim imageToSet As Image = Nothing
Dim image As New Fireball.Drawing.FreeImage("C:\text.pcx")
imageToSet = image.GetBitmap()
PictureBox1.Image = imageToSet

' Note, this code was translated from C#.NET and may contain a few errors.[/code2]


Re: Help with PCX file. - Worf - 10-15-2014

Hi brandonio21

Sorry for the late reply, just saw this post while browsing. I managed to find gdpictures which supports .pcx files.

Thank you for your help.

Regards

Tony