473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to load pcx-images into an System.Drawing.Bitmap ?

I'm working on a project that have to load an display pcx-images in a
PictureBox-control. When I try to load the file with Bitmap.FromFile I get an
exception. Does anybody have an idea ?
Apr 3 '08 #1
3 8654
You can't do it with the framework. You'll need to use something like
FreeImage (http://freeimage.sourceforge.net/) or Gfl Sdk
(http://pagesperso-orange.fr/pierre.g/xnview/engfl.html)

They're both unmanaged libraries, but you can use interop to call them.
FreeImage has 2 .NET wrappers available already, so it's probably the easier
way to go.

"Per" <Pe*@discussions.microsoft.comwrote in message
news:05**********************************@microsof t.com...
I'm working on a project that have to load an display pcx-images in a
PictureBox-control. When I try to load the file with Bitmap.FromFile I get
an
exception. Does anybody have an idea ?

Apr 3 '08 #2
On Apr 3, 3:37*am, Per <P...@discussions.microsoft.comwrote:
I'm working on a project that have to load an display pcx-images in a
PictureBox-control. When I try to load the file with Bitmap.FromFile I getan
exception. Does anybody have an idea ?
Hi,

There is no support for PCX in the framework I think, in this case
you should try to find a third party control that allows it. I would
first stop by codeproject or some of the other code repositories to
see if there is a managed (and free) version around.
Ps:
If you find one please post it back here for the posterity :)
Apr 3 '08 #3
I found a wrapper for FreeImage that workt perfect. It's called
dotnetFireBall http://www.codeplex.com/dotnetfireball.

Image imageToSet = null;

Fireball.Drawing.FreeImage image = new FreeImage(@"c:\test.pcx");
imageToSet = image.GetBitmap();

pictureBoxImage.Image = imageToSet;

"Fredo" wrote:
You can't do it with the framework. You'll need to use something like
FreeImage (http://freeimage.sourceforge.net/) or Gfl Sdk
(http://pagesperso-orange.fr/pierre.g/xnview/engfl.html)

They're both unmanaged libraries, but you can use interop to call them.
FreeImage has 2 .NET wrappers available already, so it's probably the easier
way to go.

"Per" <Pe*@discussions.microsoft.comwrote in message
news:05**********************************@microsof t.com...
I'm working on a project that have to load an display pcx-images in a
PictureBox-control. When I try to load the file with Bitmap.FromFile I get
an
exception. Does anybody have an idea ?


Apr 4 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Matthew Wells | last post by:
I am trying to load a form (load Me) without the form becoming visible. If I try me.hide or me.visible = false, they load the form and the form blinks before becoming invisible. Is there a way to...
6
by: JS | last post by:
EE instance DB2 v7.2.0 fixpack 3 on WIN2K. I select some data from a table A and write it to a file using the COALESCE function and whitespace as the null character: eg coalesce(col1, ' '). This...
3
by: Prince Kumar | last post by:
When running LOAD with "ALLOW READ ACCESS", I get the following error if select is running againt the table (isolation UR). load.sql --------- db2 load from /u02/data/dly_d040817_test.dat of...
1
by: Mateusz [PEYN] Adamus | last post by:
Hi Does anyone know how can I create a .pcx image file from for example ..bmp file in c#? I googled but came accross no usable example therefor I ask you. TIA best regarsd Mateusz Adamus
0
by: Tyttan | last post by:
Hi, I'm on a project, where i need to handle PCX files. Does anybody nows how to show on the screen the image from a buffer? Or write and read the PCX from a file? I've found nothing, and the...
2
by: **Developer** | last post by:
I have a Form (FV&C) containing a userconrtrol (CF&E) I do a ShowDialog for the form and the form's Load calls a method of the UserControl. The first time I do this the usercontrol appears on...
1
by: huyuhui | last post by:
The following is a question of LOAD utility. Question: How does the DB2 enforce table check constraints for data added to table with the LOAD utility? A. With the BUILD phase of LOAD B. With the...
2
by: contractsup | last post by:
Environment: $ uname -a AIX <withheld2 5 000100614C00 $ db2level DB21085I Instance "<withheld>" uses "32" bits and DB2 code release "SQL08024" with level identifier "03050106"....
5
by: danfan46 | last post by:
Hi. I'm on DB2 9.5.0.1 on Linux AMD 64 and the database has four partitions where catalog is on partion 0 and user data on 1 thru 3. After a load failure (path to load file was wrong) I...
2
by: Venkat G | last post by:
$ db2 describe table venkat Data type Column Column name schema Data type name Length Scale Nulls...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.