?
Solved

How do I open a *.PCX file with VB

Posted on 1998-12-28
13
Medium Priority
?
401 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 800 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses
Course of the Month8 days, 9 hours left to enroll

764 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