Solved

How do I open a *.PCX file with VB

Posted on 1998-12-28
13
385 Views
Last Modified: 2012-06-21
Does anyone know how I can open a PCX file using VB?
0
Comment
Question by:Steve2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 2
  • 2
  • +2
13 Comments
 
LVL 2

Expert Comment

by:polygon
ID: 1452728
you must either find a control to do so, or you must make your own algorithm to do it. You must then know the format PCX files are stored and read then in binary mode.
The PCX file starts with some 128 bytes of info, then the actual pixels and at the end - 768 bytes difining the 256 colors used. Just search the internet for detailed description as I don't want to write it all here.
0
 

Author Comment

by:Steve2
ID: 1452729
Thanks Polygon,

    I have been searching the internet, but I must be looking in all the wrong places because I can't seem to find any information. If anybody knows of anyplace I can either find these tools or information on the algorithim of the PCX file please let me know.

0
 
LVL 4

Expert Comment

by:idcanada
ID: 1452730

You will need to convert PCX to BMP before.
Have a look at http://www.total.net/~idc/
I will post a small sample their that will show you this process.


0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:Steve2
ID: 1452731
The reason I'm trying to learn how to open this format is because of its space saving format. I've tried BMP's, but they start to take up WAYYY too much space after a few. A 44KB PCX file weighs in at about 62KB, I know this may not seem like much of a difference, but when you get a couple hundred rendered beleive me, you need as much space as possible. Thanks just the same though.
0
 

Author Comment

by:Steve2
ID: 1452732
Allow me to correct the spelling errors of my last comment.

The reason I'm trying to learn how to open a PCX file is because of it's small size in comparison to other image formats. I would do my program in BMP's but they begin to take up way too much space. A PCX file I've rendered is 44KB, but the BMP version of that rendering weighs in at about 62KB. Although this may not seem like a biug difference in size, when you have a couple hundred BMP's the size difference does become VERY noticeable. That is the reason for my question.
0
 

Author Comment

by:Steve2
ID: 1452733
Does anyone know of any FREE 3rd party OCX controls that can do this for me?
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1452734
Use JPG iso PCX. Much smaller. And viewable in VB
0
 
LVL 4

Accepted Solution

by:
chabaud earned 200 total points
ID: 1452735
Use GIF for 256 colors looseless compressed bitmap
or JPEG for photo bitmap.

This format can be open directly with VB from VB5 (see the Picture property or the LoadPicture() function).


0
 

Author Comment

by:Steve2
ID: 1452736
Yeah thanks, I figured it out a little bit ago myself. I was jsut waiting for someone to answer it because I couldn't figure out how to delete it, good answer!
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1452737
Steve2: Please don't accept answers that has been listed as comments before. If you want to remove a question tell an expert to answer the question.
Chabaud: I already told steve2 to use JPG iso GIF. Please don't answer using another person's comment
0
 
LVL 4

Expert Comment

by:chabaud
ID: 1452738
Sorry mirkwood my "new" answer was for GIF (that don't appear upper).
0
 

Author Comment

by:Steve2
ID: 1452739
Sorry Chabaud I was trying to figure out if there was a way to give points for a comment but I guess there isn't. So I figured it would've been best to delete it, but I didn't know how to go about doing that unless someone answered it. I don't use this Experts Exchange program very much. Once again I apologize and will try not to let it happen in the future.
0
 

Author Comment

by:Steve2
ID: 1452740
I also apologize to you too Mirkwood, I was aware of our comment and it was very helpful, I had just figured it out a day in advance to your comment, and was in the process of figuring out how to delete the question without having an answer, but apparently was unsuccessful.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Macro Excel - Multiple If conditions 2 88
Advice in Xamarin 21 109
MS Access 03, TransferText, decimal places 8 86
Set WorkSheet  not Working 9 52
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question